<?xml version="1.0"?>

<st-source>
<!-- 
Name: CADSM-UI-DXF
HideSource: false
PackageName: CADSM-UI-DXF
Parcel: #('cadsmdxf')
SaveSource: true
Date: 9:14:06 am September 28, 2009
 -->
<time-stamp>From VisualWorks®, 7.5 of April 16, 2007 on September 28, 2009 at 9:14:06 am</time-stamp>


<do-it>(Dialog confirm: 'You are filing-in a Parcel source file!\\While this is possible it will not have\the same effect as loading the parcel.\None of the Parcel''s prerequisites will\be loaded and none of its load actions\will be performed.\\Are you sure you want to file-in?' withCRs) ifFalse: [self error: 'Parcel file-in abandoned.  Choose terminate or close.']</do-it>

<class>
<name>DXFParser</name>
<environment>CADSM.UI.DXF</environment>
<super>Jun.JunDXFScanner</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>lengthUnit cVar cLayer cLayerColor aLayer iColor cBLOCK aItem cCount aAssembly </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-UI-DXF</category>
<attributes>
<package>CADSM-UI-DXF</package>
</attributes>
</class>

<class>
<name>DXFBLOCK</name>
<environment>CADSM.UI.DXF</environment>
<super>StCAD.StGeo.GEOSketch</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-UI-DXF</category>
<attributes>
<package>CADSM-UI-DXF</package>
</attributes>
</class>

<shared-variable>
<name>ColorTable</name>
<environment>CADSM.UI.DXF.DXFParser</environment>
<private>false</private>
<constant>false</constant>
<category>accessing</category>
<initializer>CADSM.UI.DXF.DXFParser initColorTable</initializer>
<attributes>
<package>CADSM-UI-DXF</package>
</attributes>
</shared-variable>

<methods>
<class-id>CADSM.UI.DXF.DXFParser</class-id> <category>error handling</category>

<body package="CADSM-UI-DXF" selector="expected:">expected: aString 
	"Notify a problem at token 'here'"

	^self notify: aString , ' expected -&gt;' at: mark</body>

<body package="CADSM-UI-DXF" selector="notify:at:">notify: aString at: position 
	"Temporarily reset source in order to get full contents"

	| p contents |
	p := source position.
	contents := source
				reset;
				contents.
	source position: p.
	(SyntaxErrorException new)
		targetClass: nil;
		messageText: aString;
		source: contents;
		position: position;
		raiseSignal</body>
</methods>

<methods>
<class-id>CADSM.UI.DXF.DXFParser</class-id> <category>parsing entities</category>

<body package="CADSM-UI-DXF" selector="ARC">ARC
	| markName x y z extrudeX extrudeY extrudeZ cBlock radius startAngle endAngle twoPi arcAngle n crfpf dangle newItem rFfF aARot |
	markName := mark printString.
	aLayer := '0'.
	iColor := 256.
	x := y := z := 0.
	extrudeX := extrudeY := 0.
	extrudeZ := 1.
	cBlock := IdentityDictionary new: 10.
	cBlock at: 8 put: [aLayer := dataString].
	cBlock at: 10 put: [x := dataNumber * lengthUnit].
	cBlock at: 20 put: [y := dataNumber * lengthUnit].
	cBlock at: 30 put: [z := dataNumber * lengthUnit].
	cBlock at: 40 put: [radius := dataNumber * lengthUnit].
	cBlock at: 50 put: [startAngle := dataNumber degreesToRadians].
	cBlock at: 51 put: [endAngle := dataNumber degreesToRadians].
	cBlock at: 62 put: [iColor := dataNumber].
	cBlock at: 210 put: [extrudeX := dataNumber].
	cBlock at: 220 put: [extrudeY := dataNumber].
	cBlock at: 230 put: [extrudeZ := dataNumber].
	
	[self nextPair.
	self checkEOFin: 'ARC'.
	groupCode = 0] 
			whileFalse: [(cBlock at: groupCode) value].
	twoPi := 2 * Double pi.
	arcAngle := endAngle &gt; startAngle 
				ifTrue: [endAngle - startAngle]
				ifFalse: [endAngle + twoPi - startAngle].
	n := (self nSegment * arcAngle / twoPi) rounded + 1.
	crfpf := Array new: n + 1.
	dangle := arcAngle / n.
	1 to: n + 1
		do: 
			[:i | 
			| angle xx yy rfpf |
			angle := startAngle + ((i - 1) * dangle).
			xx := radius * angle cos.
			yy := radius * angle sin.
			rfpf := xx yd: yy zd: 0.0d.
			crfpf at: i put: rfpf].
	newItem := StCAD.StGeo.DXFPolyline new.
	newItem rfpointsf: crfpf.
	rFfF := x yd: y zd: z.
	aARot := self aAfromExtrusion: (extrudeX yd: extrudeY zd: extrudeZ).
	newItem refFrame rFfF: (aARot timesFullColumn: rFfF) aAFf: aARot.
	self unNextPair.
	newItem name: markName.
	self setColorFor: newItem.
	aItem := aLayer -&gt; newItem.
	self count: #arc.
	^true</body>

<body package="CADSM-UI-DXF" selector="CIRCLE">CIRCLE
	| markName x y z thickness extrudeX extrudeY extrudeZ cBlock radius n crfpf dangle newItem rFfF aARot block |
	markName := mark printString.
	aLayer := '0'.
	iColor := 256.
	x := y := z := 0.
	thickness := 0.
	extrudeX := extrudeY := 0.
	extrudeZ := 1.
	cBlock := IdentityDictionary new: 10.
	cBlock at: 8 put: [aLayer := dataString].
	cBlock at: 10 put: [x := dataNumber * lengthUnit].
	cBlock at: 20 put: [y := dataNumber * lengthUnit].
	cBlock at: 30 put: [z := dataNumber * lengthUnit].
	cBlock at: 39 put: [thickness := dataNumber * lengthUnit].
	cBlock at: 40 put: [radius := dataNumber * lengthUnit].
	cBlock at: 62 put: [iColor := dataNumber].
	cBlock at: 210 put: [extrudeX := dataNumber].
	cBlock at: 220 put: [extrudeY := dataNumber].
	cBlock at: 230 put: [extrudeZ := dataNumber].
	
	[self nextPair.
	self checkEOFin: 'CIRCLE'.
	groupCode = 0] 
			whileFalse: [(cBlock at: groupCode) value].
	n := self nSegment.
	crfpf := Array new: n + 1.
	dangle := 2 * Double pi / n.
	1 to: n
		do: 
			[:i | 
			| angle xx yy rfpf |
			angle := (i - 1) * dangle.
			xx := radius * angle cos.
			yy := radius * angle sin.
			rfpf := xx yd: yy zd: 0.0d.
			crfpf at: i put: rfpf].
	crfpf at: n + 1 put: crfpf first.
	newItem := self LWPOLYLINEWith: crfpf thickness: thickness.
	block := 
			[:graphic | 
			graphic name: markName.
			self setColorFor: graphic.
			(x = 0 and: 
					[y = 0 
						and: [z = 0 and: [extrudeX = 0 and: [extrudeY = 0 and: [extrudeZ = 1]]]]]) 
				ifFalse: 
					[rFfF := x yd: y zd: z.
					aARot := self aAfromExtrusion: (extrudeX yd: extrudeY zd: extrudeZ).
					graphic refFrame rFfF: (aARot timesFullColumn: rFfF) aAFf: aARot]].
	newItem isSequenceable 
		ifTrue: [newItem do: block]
		ifFalse: [block value: newItem].
	self unNextPair.
	aItem := aLayer -&gt; newItem.
	self count: #circle.
	^true</body>

<body package="CADSM-UI-DXF" selector="CIRCLE1">CIRCLE1
	| markName x y z extrudeX extrudeY extrudeZ cBlock radius n crfpf dangle newItem rFfF aARot |
	markName := mark printString.
	aLayer := '0'.
	iColor := 256.
	x := y := z := 0.
	extrudeX := extrudeY := 0.
	extrudeZ := 1.
	cBlock := IdentityDictionary new: 10.
	cBlock at: 8 put: [aLayer := dataString].
	cBlock at: 10 put: [x := dataNumber * lengthUnit].
	cBlock at: 20 put: [y := dataNumber * lengthUnit].
	cBlock at: 30 put: [z := dataNumber * lengthUnit].
	cBlock at: 40 put: [radius := dataNumber * lengthUnit].
	cBlock at: 62 put: [iColor := dataNumber].
	cBlock at: 210 put: [extrudeX := dataNumber].
	cBlock at: 220 put: [extrudeY := dataNumber].
	cBlock at: 230 put: [extrudeZ := dataNumber].
	
	[self nextPair.
	self checkEOFin: 'CIRCLE'.
	groupCode = 0] 
			whileFalse: [(cBlock at: groupCode) value].
	n := 100.
	crfpf := Array new: n + 1.
	dangle := 2 * Double pi / n.
	1 to: n
		do: 
			[:i | 
			| angle xx yy rfpf |
			angle := (i - 1) * dangle.
			xx := radius * angle cos.
			yy := radius * angle sin.
			rfpf := xx yd: yy zd: 0.0d.
			crfpf at: i put: rfpf].
	crfpf at: n + 1 put: crfpf first.
	newItem := StCAD.StGeo.DXFPolyline new.
	newItem rfpointsf: crfpf.
	rFfF := x yd: y zd: z.
	aARot := self aAfromExtrusion: (extrudeX yd: extrudeY zd: extrudeZ).
	newItem refFrame rFfF: (aARot timesFullColumn: rFfF) aAFf: aARot.
	self unNextPair.
	newItem name: markName.
	self setColorFor: newItem.
	aItem := aLayer -&gt; newItem.
	self count: #circle.
	^true</body>

<body package="CADSM-UI-DXF" selector="closedMNPolygonMeshWith:m:n:">closedMNPolygonMeshWith: cVertex m: m n: n 
	| aMatrix aMatrix2 aMatrix3 cPolygon |
	aMatrix := self 
				matrixWith: cVertex
				m: m
				n: n.
	aMatrix2 := StCAD.StMath.StMFullMatrix new: m + 1 by: n.
	aMatrix2 
		at: 1
		and: 1
		putFullMatrix: aMatrix.
	aMatrix2 
		at: m + 1
		and: 1
		putFullRow: (aMatrix at: 1).
	aMatrix3 := StCAD.StMath.StMFullMatrix new: m + 1 by: n + 1.
	aMatrix3 
		at: 1
		and: 1
		putFullMatrix: aMatrix2.
	aMatrix3 
		at: 1
		and: n + 1
		putFullColumn: (aMatrix2 column: 1).
	cPolygon := OrderedCollection new: m * n.
	1 to: m
		do: 
			[:i | 
			1 to: n
				do: 
					[:j | 
					| aPolygon crfpf |
					aPolygon := StCAD.StGeo.DXFPolyline new.
					crfpf := OrderedCollection new: 10.
					crfpf add: (aMatrix3 at: i and: j).
					crfpf add: (aMatrix3 at: i + 1 and: j).
					crfpf add: (aMatrix3 at: i + 1 and: j + 1).
					crfpf add: (aMatrix3 at: i and: j + 1).
					crfpf add: crfpf first.
					aPolygon rfpointsf: crfpf.
					cPolygon add: aPolygon]].
	^cPolygon</body>

<body package="CADSM-UI-DXF" selector="closedMPolygonMeshWith:m:n:">closedMPolygonMeshWith: cVertex m: m n: n 
	| aMatrix aMatrix2 cPolygon |
	aMatrix := self 
				matrixWith: cVertex
				m: m
				n: n.
	aMatrix2 := StCAD.StMath.StMFullMatrix new: m + 1 by: n.
	aMatrix2 
		at: 1
		and: 1
		putFullMatrix: aMatrix.
	aMatrix2 
		at: m + 1
		and: 1
		putFullRow: (aMatrix at: 1).
	cPolygon := OrderedCollection new: m * (n - 1).
	1 to: m
		do: 
			[:i | 
			1 to: n - 1
				do: 
					[:j | 
					| aPolygon crfpf |
					aPolygon := StCAD.StGeo.DXFPolyline new.
					crfpf := OrderedCollection new: 10.
					crfpf add: (aMatrix2 at: i and: j).
					crfpf add: (aMatrix2 at: i + 1 and: j).
					crfpf add: (aMatrix2 at: i + 1 and: j + 1).
					crfpf add: (aMatrix2 at: i and: j + 1).
					crfpf add: crfpf first.
					aPolygon rfpointsf: crfpf.
					cPolygon add: aPolygon]].
	^cPolygon</body>

<body package="CADSM-UI-DXF" selector="closedNPolygonMeshWith:m:n:">closedNPolygonMeshWith: cVertex m: m n: n 
	| aMatrix aMatrix3 cPolygon |
	aMatrix := self 
				matrixWith: cVertex
				m: m
				n: n.
	aMatrix3 := StCAD.StMath.StMFullMatrix new: m by: n + 1.
	aMatrix3 
		at: 1
		and: 1
		putFullMatrix: aMatrix.
	aMatrix3 
		at: 1
		and: n + 1
		putFullColumn: (aMatrix column: 1).
	cPolygon := OrderedCollection new: (m - 1) * n.
	1 to: m - 1
		do: 
			[:i | 
			1 to: n
				do: 
					[:j | 
					| aPolygon crfpf |
					aPolygon := StCAD.StGeo.DXFPolyline new.
					crfpf := OrderedCollection new: 10.
					crfpf add: (aMatrix3 at: i and: j).
					crfpf add: (aMatrix3 at: i + 1 and: j).
					crfpf add: (aMatrix3 at: i + 1 and: j + 1).
					crfpf add: (aMatrix3 at: i and: j + 1).
					crfpf add: crfpf first.
					aPolygon rfpointsf: crfpf.
					cPolygon add: aPolygon]].
	^cPolygon</body>

<body package="CADSM-UI-DXF" selector="closedPolylineWith:">closedPolylineWith: cVertex 
	| aPolygon |
	aPolygon := StCAD.StGeo.DXFPolyline new.
	cVertex add: cVertex first.
	aPolygon rfpointsf: cVertex.
	^aPolygon</body>

<body package="CADSM-UI-DXF" selector="DFACE">DFACE
	| markName x y z x2 y2 z2 x3 y3 z3 x4 y4 z4 cBlock crfpf newItem flag cFlag |
	markName := mark printString.
	aLayer := '0'.
	iColor := 256.
	x := y := z := 0.
	x2 := y2 := z2 := 0.
	x3 := y3 := z3 := 0.
	x4 := y4 := z4 := 0.
	flag := 0.
	cBlock := IdentityDictionary new: 10.
	cBlock at: 8 put: [aLayer := dataString].
	cBlock at: 10 put: [x := dataNumber * lengthUnit].
	cBlock at: 20 put: [y := dataNumber * lengthUnit].
	cBlock at: 30 put: [z := dataNumber * lengthUnit].
	cBlock at: 11 put: [x2 := dataNumber * lengthUnit].
	cBlock at: 21 put: [y2 := dataNumber * lengthUnit].
	cBlock at: 31 put: [z2 := dataNumber * lengthUnit].
	cBlock at: 12 put: [x3 := dataNumber * lengthUnit].
	cBlock at: 22 put: [y3 := dataNumber * lengthUnit].
	cBlock at: 32 put: [z3 := dataNumber * lengthUnit].
	cBlock at: 13 put: [x4 := dataNumber * lengthUnit].
	cBlock at: 23 put: [y4 := dataNumber * lengthUnit].
	cBlock at: 33 put: [z4 := dataNumber * lengthUnit].
	cBlock at: 62 put: [iColor := dataNumber].
	cBlock at: 70 put: [flag := dataNumber].
	
	[self nextPair.
	self checkEOFin: '3DFACE'.
	groupCode = 0] 
			whileFalse: [(cBlock at: groupCode) value].
	crfpf := OrderedCollection new: 5.
	crfpf addLast: (x yd: y zd: z).
	crfpf addLast: (x2 yd: y2 zd: z2).
	crfpf addLast: (x3 yd: y3 zd: z3).
	crfpf addLast: (x4 yd: y4 zd: z4).
	crfpf addLast: crfpf first.
	newItem := StCAD.StGeo.DXFPolyline new.
	newItem rfpointsf: crfpf.
	flag &gt; 0 
		ifTrue: 
			[cFlag := OrderedCollection new: 5.
			cFlag add: ((flag bitAt: 1) = 1) not.
			cFlag add: ((flag bitAt: 2) = 1) not.
			cFlag add: ((flag bitAt: 3) = 1) not.
			cFlag add: ((flag bitAt: 4) = 1) not.
			newItem cFlag: cFlag].
	self unNextPair.
	newItem name: markName.
	self setColorFor: newItem.
	aItem := aLayer -&gt; newItem.
	self count: #'3DFACE'.
	^true</body>

<body package="CADSM-UI-DXF" selector="DFACE1">DFACE1
	| markName x y z x2 y2 z2 x3 y3 z3 x4 y4 z4 cBlock crfpf newItem |
	markName := mark printString.
	aLayer := '0'.
	iColor := 256.
	x := y := z := 0.
	x2 := y2 := z2 := 0.
	x3 := y3 := z3 := 0.
	x4 := y4 := z4 := 0.
	cBlock := IdentityDictionary new: 10.
	cBlock at: 8 put: [aLayer := dataString].
	cBlock at: 10 put: [x := dataNumber * lengthUnit].
	cBlock at: 20 put: [y := dataNumber * lengthUnit].
	cBlock at: 30 put: [z := dataNumber * lengthUnit].
	cBlock at: 11 put: [x2 := dataNumber * lengthUnit].
	cBlock at: 21 put: [y2 := dataNumber * lengthUnit].
	cBlock at: 31 put: [z2 := dataNumber * lengthUnit].
	cBlock at: 12 put: [x3 := dataNumber * lengthUnit].
	cBlock at: 22 put: [y3 := dataNumber * lengthUnit].
	cBlock at: 32 put: [z3 := dataNumber * lengthUnit].
	cBlock at: 13 put: [x4 := dataNumber * lengthUnit].
	cBlock at: 23 put: [y4 := dataNumber * lengthUnit].
	cBlock at: 33 put: [z4 := dataNumber * lengthUnit].
	cBlock at: 62 put: [iColor := dataNumber].
	
	[self nextPair.
	self checkEOFin: '3DFACE'.
	groupCode = 0] 
			whileFalse: [(cBlock at: groupCode) value].
	crfpf := OrderedCollection new: 5.
	crfpf addLast: (x yd: y zd: z).
	crfpf addLast: (x2 yd: y2 zd: z2).
	crfpf addLast: (x3 yd: y3 zd: z3).
	crfpf addLast: (x4 yd: y4 zd: z4).
	crfpf addLast: crfpf first.
	newItem := StCAD.StGeo.DXFPolyline new.
	newItem rfpointsf: crfpf.
	self unNextPair.
	newItem name: markName.
	self setColorFor: newItem.
	aItem := aLayer -&gt; newItem.
	self count: #'3DFACE'.
	^true</body>

<body package="CADSM-UI-DXF" selector="ELLIPSE">ELLIPSE
	| markName x y z extrudeX extrudeY extrudeZ cBlock x2 y2 z2 ratio startAngle endAngle rFfF xDir zDir aAFf majorRadius minorRadius arcAngle n crfpf dangle newItem |
	markName := mark printString.
	aLayer := '0'.
	iColor := 256.
	x := y := z := 0.
	extrudeX := extrudeY := 0.
	extrudeZ := 1.
	cBlock := IdentityDictionary new: 10.
	cBlock at: 8 put: [aLayer := dataString].
	cBlock at: 10 put: [x := dataNumber * lengthUnit].
	cBlock at: 20 put: [y := dataNumber * lengthUnit].
	cBlock at: 30 put: [z := dataNumber * lengthUnit].
	cBlock at: 11 put: [x2 := dataNumber * lengthUnit].
	cBlock at: 21 put: [y2 := dataNumber * lengthUnit].
	cBlock at: 31 put: [z2 := dataNumber * lengthUnit].
	cBlock at: 40 put: [ratio := dataNumber].
	cBlock at: 41 put: [startAngle := dataNumber].
	cBlock at: 42 put: [endAngle := dataNumber].
	cBlock at: 62 put: [iColor := dataNumber].
	cBlock at: 210 put: [extrudeX := dataNumber].
	cBlock at: 220 put: [extrudeY := dataNumber].
	cBlock at: 230 put: [extrudeZ := dataNumber].
	
	[self nextPair.
	self checkEOFin: 'ELLIPSE'.
	groupCode = 0] 
			whileFalse: [(cBlock at: groupCode) value].
	rFfF := x yd: y zd: z.
	xDir := x2 yd: y2 zd: z2.
	zDir := extrudeX yd: extrudeY zd: extrudeZ.
	aAFf := StCAD.StMath.StMFullMatrix rotationMatrixFromzDir: zDir xDir: xDir.
	majorRadius := xDir length.
	minorRadius := ratio * majorRadius.
	arcAngle := endAngle - startAngle.
	n := (self nSegment * arcAngle / (2 * Double pi)) rounded + 1.
	crfpf := Array new: n + 1.
	dangle := arcAngle / n.
	1 to: n + 1
		do: 
			[:i | 
			| angle xx yy rfpf |
			angle := startAngle + ((i - 1) * dangle).
			xx := majorRadius * angle cos.
			yy := minorRadius * angle sin.
			rfpf := xx yd: yy zd: 0.0d.
			crfpf at: i put: rfpf].
	newItem := StCAD.StGeo.DXFPolyline new.
	newItem refFrame rFfF: rFfF aAFf: aAFf.
	newItem rfpointsf: crfpf.
	self unNextPair.
	newItem name: markName.
	self setColorFor: newItem.
	aItem := aLayer -&gt; newItem.
	self count: #ellipse.
	^true</body>

<body package="CADSM-UI-DXF" selector="INSERT">INSERT
	| markName x y z xScale yScale zScale angle extrudeX extrudeY extrudeZ cBlock defName newItem rFfF aAFf aARot aPart aMassMarker |
	markName := mark printString.
	aLayer := '0'.
	iColor := 256.
	x := y := z := 0.
	xScale := yScale := zScale := 1.
	angle := 0.
	extrudeX := extrudeY := 0.
	extrudeZ := 1.
	cBlock := IdentityDictionary new: 10.
	cBlock at: 2 put: [defName := dataString].
	cBlock at: 8 put: [aLayer := dataString].
	cBlock at: 10 put: [x := dataNumber * lengthUnit].
	cBlock at: 20 put: [y := dataNumber * lengthUnit].
	cBlock at: 30 put: [z := dataNumber * lengthUnit].
	cBlock at: 41 put: [xScale := dataNumber].
	cBlock at: 42 put: [yScale := dataNumber].
	cBlock at: 43 put: [zScale := dataNumber].
	cBlock at: 50 put: [angle := dataNumber].
	cBlock at: 62 put: [iColor := dataNumber].
	cBlock at: 210 put: [extrudeX := dataNumber].
	cBlock at: 220 put: [extrudeY := dataNumber].
	cBlock at: 230 put: [extrudeZ := dataNumber].
	
	[self nextPair.
	self checkEOFin: 'INSERT'.
	groupCode = 0] 
			whileFalse: [(cBlock at: groupCode) value].
	(cBLOCK includesKey: defName) 
		ifFalse: [self notify: 'Unknown BLOCK is found -&gt;' at: mark].
	newItem := (cBLOCK at: defName) copy.
	newItem := newItem scaledBy: (xScale yd: yScale zd: zScale).
	self unNextPair.
	newItem name: markName.
	aItem := aLayer -&gt; newItem.
	newItem graphics isEmpty not 
		ifTrue: 
			[aAssembly ifNil: 
					[rFfF := x yd: y zd: z.
					aAFf := (StCAD.StGeo.GEOEulerAnglesxyz 
								with: 0.0d
								with: 0.0d
								with: angle asDouble degreesToRadians) aA.
					aARot := self aAfromExtrusion: (extrudeX yd: extrudeY zd: extrudeZ).
					newItem refFrame rFfF: (aARot timesFullColumn: rFfF)
						aAFf: (aARot timesFullMatrix: aAFf)]
				ifNotNil: 
					[aPart := StCAD.StGeo.GEOPart new.
					aPart name: defName.
					aPart aDXFBLOCK: newItem.
					aMassMarker := StCAD.StGeo.GEOMassMarker new.
					aMassMarker name: 'MassMarker'.
					aMassMarker refFrame rFfF: aPart aDXFBLOCK aBoundingBox center
						aAFf: (StCAD.StMath.StMFullMatrix identity: 3).
					aPart aMassMarker: aMassMarker.
					rFfF := x yd: y zd: z.
					aAFf := (StCAD.StGeo.GEOEulerAnglesxyz 
								with: 0.0d
								with: 0.0d
								with: angle asDouble degreesToRadians) aA.
					aARot := self aAfromExtrusion: (extrudeX yd: extrudeY zd: extrudeZ).
					aPart refFrame rFfF: (aARot timesFullColumn: rFfF)
						aAFf: (aARot timesFullMatrix: aAFf).
					aAssembly addAnyPart: aPart]].
	^true</body>

<body package="CADSM-UI-DXF" selector="LINE">LINE
	"Extrusion is always in z direction."

	| markName x y z x2 y2 z2 thickness extrudeX extrudeY extrudeZ cBlock newItem |
	markName := mark printString.
	aLayer := '0'.
	iColor := 256.
	x := y := z := 0.
	x2 := y2 := z2 := 0.
	thickness := 0.
	extrudeX := extrudeY := 0.
	extrudeZ := 1.
	cBlock := IdentityDictionary new: 10.
	cBlock at: 8 put: [aLayer := dataString].
	cBlock at: 10 put: [x := dataNumber * lengthUnit].
	cBlock at: 20 put: [y := dataNumber * lengthUnit].
	cBlock at: 30 put: [z := dataNumber * lengthUnit].
	cBlock at: 11 put: [x2 := dataNumber * lengthUnit].
	cBlock at: 21 put: [y2 := dataNumber * lengthUnit].
	cBlock at: 31 put: [z2 := dataNumber * lengthUnit].
	cBlock at: 39 put: [thickness := dataNumber * lengthUnit].
	cBlock at: 62 put: [iColor := dataNumber].
	cBlock at: 210 put: [extrudeX := dataNumber].
	cBlock at: 220 put: [extrudeY := dataNumber].
	cBlock at: 230 put: [extrudeZ := dataNumber].
	
	[self nextPair.
	self checkEOFin: 'LINE'.
	groupCode = 0] 
			whileFalse: [(cBlock at: groupCode) value].
	newItem := self 
				LWPOLYLINEWith: (Array with: (x yd: y zd: z) with: (x2 yd: y2 zd: z2))
				thickness: thickness.
	self unNextPair.
	newItem name: markName.
	self setColorFor: newItem.
	aItem := aLayer -&gt; newItem.
	self count: #line.
	^true</body>

<body package="CADSM-UI-DXF" selector="LINE1">LINE1
	| markName x y z x2 y2 z2 extrudeX extrudeY extrudeZ cBlock newItem aARot |
	markName := mark printString.
	aLayer := '0'.
	iColor := 256.
	x := y := z := 0.
	x2 := y2 := z2 := 0.
	extrudeX := extrudeY := 0.
	extrudeZ := 1.
	cBlock := IdentityDictionary new: 10.
	cBlock at: 8 put: [aLayer := dataString].
	cBlock at: 10 put: [x := dataNumber * lengthUnit].
	cBlock at: 20 put: [y := dataNumber * lengthUnit].
	cBlock at: 30 put: [z := dataNumber * lengthUnit].
	cBlock at: 11 put: [x2 := dataNumber * lengthUnit].
	cBlock at: 21 put: [y2 := dataNumber * lengthUnit].
	cBlock at: 31 put: [z2 := dataNumber * lengthUnit].
	cBlock at: 62 put: [iColor := dataNumber].
	cBlock at: 210 put: [extrudeX := dataNumber].
	cBlock at: 220 put: [extrudeY := dataNumber].
	cBlock at: 230 put: [extrudeZ := dataNumber].
	
	[self nextPair.
	self checkEOFin: 'LINE'.
	groupCode = 0] 
			whileFalse: [(cBlock at: groupCode) value].
	newItem := StCAD.StGeo.DXFPolyline start: (x yd: y zd: z)
				end: (x2 yd: y2 zd: z2).
	aARot := self aAfromExtrusion: (extrudeX yd: extrudeY zd: extrudeZ).
	newItem refFrame aAFf: aARot.
	self unNextPair.
	newItem name: markName.
	self setColorFor: newItem.
	aItem := aLayer -&gt; newItem.
	self count: #line.
	^true</body>

<body package="CADSM-UI-DXF" selector="LWPOLYLINE">LWPOLYLINE
	| markName flag cx cy z thickness cBulge extrudeX extrudeY extrudeZ cBlock n rfpointsf newItem aARot block |
	markName := mark printString.
	aLayer := '0'.
	iColor := 256.
	flag := 0.
	cx := OrderedCollection new: 10.
	cy := OrderedCollection new: 10.
	z := 0.
	thickness := 0.
	cBulge := IdentityDictionary new: 10.
	extrudeX := extrudeY := 0.
	extrudeZ := 1.
	cBlock := IdentityDictionary new: 10.
	cBlock at: 8 put: [aLayer := dataString].
	cBlock at: 10 put: [cx addLast: dataNumber * lengthUnit].
	cBlock at: 20 put: [cy addLast: dataNumber * lengthUnit].
	cBlock at: 38 put: [z := dataNumber * lengthUnit].
	cBlock at: 39 put: [thickness := dataNumber * lengthUnit].
	cBlock at: 42 put: [cBulge at: cx size put: dataNumber].
	cBlock at: 62 put: [iColor := dataNumber].
	cBlock at: 70 put: [flag := dataNumber].
	cBlock at: 90 put: [n := dataNumber].
	cBlock at: 210 put: [extrudeX := dataNumber].
	cBlock at: 220 put: [extrudeY := dataNumber].
	cBlock at: 230 put: [extrudeZ := dataNumber].
	
	[self nextPair.
	self checkEOFin: 'LWPOLYLINE'.
	groupCode = 0] 
			whileFalse: [(cBlock at: groupCode) value].
	rfpointsf := OrderedCollection new: n + 1.
	1 to: n do: [:i | rfpointsf addLast: ((cx at: i) yd: (cy at: i) zd: z)].
	flag = 1 ifTrue: [rfpointsf addLast: rfpointsf first].
	rfpointsf := self LWPOLYLINEWith: rfpointsf cBulge: cBulge.
	newItem := self LWPOLYLINEWith: rfpointsf thickness: thickness.
	block := 
			[:graphic | 
			graphic name: markName.
			self setColorFor: graphic.
			(extrudeX = 0 and: [extrudeY = 0 and: [extrudeZ = 1]]) 
				ifFalse: 
					[aARot := self aAfromExtrusion: (extrudeX yd: extrudeY zd: extrudeZ).
					graphic refFrame aAFf: aARot]].
	newItem isSequenceable 
		ifTrue: [newItem do: block]
		ifFalse: [block value: newItem].
	self unNextPair.
	aItem := aLayer -&gt; newItem.
	self count: #lwpolyline.
	^true</body>

<body package="CADSM-UI-DXF" selector="LWPOLYLINE1">LWPOLYLINE1
	| markName flag cx cy z extrudeX extrudeY extrudeZ cBlock n rfpointsf newItem aARot |
	markName := mark printString.
	aLayer := '0'.
	iColor := 256.
	flag := 0.
	cx := OrderedCollection new: 10.
	cy := OrderedCollection new: 10.
	z := 0.
	extrudeX := extrudeY := 0.
	extrudeZ := 1.
	cBlock := IdentityDictionary new: 10.
	cBlock at: 8 put: [aLayer := dataString].
	cBlock at: 10 put: [cx addLast: dataNumber * lengthUnit].
	cBlock at: 20 put: [cy addLast: dataNumber * lengthUnit].
	cBlock at: 38 put: [z := dataNumber * lengthUnit].
	cBlock at: 62 put: [iColor := dataNumber].
	cBlock at: 70 put: [flag := dataNumber].
	cBlock at: 90 put: [n := dataNumber].
	cBlock at: 210 put: [extrudeX := dataNumber].
	cBlock at: 220 put: [extrudeY := dataNumber].
	cBlock at: 230 put: [extrudeZ := dataNumber].
	
	[self nextPair.
	self checkEOFin: 'LWPOLYLINE'.
	groupCode = 0] 
			whileFalse: [(cBlock at: groupCode) value].
	rfpointsf := OrderedCollection new: n + 1.
	1 to: n do: [:i | rfpointsf addLast: ((cx at: i) yd: (cy at: i) zd: z)].
	flag = 1 ifTrue: [rfpointsf addLast: rfpointsf first].
	newItem := StCAD.StGeo.DXFPolyline new.
	newItem rfpointsf: rfpointsf.
	aARot := self aAfromExtrusion: (extrudeX yd: extrudeY zd: extrudeZ).
	newItem refFrame aAFf: aARot.
	self unNextPair.
	newItem name: markName.
	self setColorFor: newItem.
	aItem := aLayer -&gt; newItem.
	self count: #polyline.
	^true</body>

<body package="CADSM-UI-DXF" selector="LWPOLYLINEWith:cBulge:">LWPOLYLINEWith: crfpf cBulge: cBulge 
	"Bulge is the number of half chord length from the midpoint of the chord to the opposite point on the circumference of the circle."

	"
	d := half chord length.
	r := radius.
	h := height of center from chord.
	b := bulge.
	bd = r - h.
	r^2 = d^2 + h^2.
	(bd + h)^2 = d^2 + h^2.
	(bd)^2 + 2bdh + h^2 = d^2 + h^2.
	2bdh = d^2 - (bd)^2.
	h = (d^2 - (bd)^2)/2bd = (d/2b)*(1 - b^2)
	"

	| n answer |
	n := crfpf size.
	answer := OrderedCollection new: n.
	1 to: n - 1
		do: 
			[:i | 
			(cBulge at: i) ifNil: [answer add: (crfpf at: i)]
				ifNotNil: 
					[:aBulge | 
					| sign magBulge dVector dDir dMag hDir hMag rMag center offAngle endAngle startAngle twoPi arcAngle nn dangle |
					sign := aBulge sign.
					magBulge := aBulge abs.
					dVector := 0.5d * ((crfpf at: i + 1) - (crfpf at: i)).
					dDir := dVector copy normalizeSelf.
					dMag := dVector length.
					hDir := ((StCAD.StGeo.GEOEulerAnglesxyz 
								with: 0.0d
								with: 0.0d
								with: sign * Double pi / 2)
								calc;
								aA) timesFullColumn: dDir.
					hMag := dMag / (2 * magBulge) * (1 - (magBulge * magBulge)).
					rMag := magBulge * dMag + hMag.
					center := (crfpf at: i) + dVector + (hMag * hDir).
					offAngle := Double arcTan0to2piY: hDir y negated overX: hDir x negated.
					endAngle := sign * (Double arcTan0to2piY: dMag overX: hMag).
					startAngle := endAngle negated.
					endAngle := endAngle + offAngle.
					startAngle := startAngle + offAngle.
					twoPi := 2 * Double pi.
					arcAngle := endAngle - startAngle.
					nn := (self nSegment * arcAngle abs / twoPi) rounded + 1.
					dangle := arcAngle / nn.
					answer add: (crfpf at: i).
					2 to: nn
						do: 
							[:j | 
							| angle xx yy rfpf |
							angle := startAngle + ((j - 1) * dangle).
							xx := rMag * angle cos.
							yy := rMag * angle sin.
							rfpf := center + (xx yd: yy zd: 0.0d).
							answer add: rfpf]]].
	answer add: crfpf last.
	^answer</body>

<body package="CADSM-UI-DXF" selector="LWPOLYLINEWith:thickness:">LWPOLYLINEWith: crfbotf thickness: thickness 
	| block |
	block := 
			[:crfpf | 
			(StCAD.StGeo.DXFPolyline new)
				rfpointsf: crfpf;
				yourself].
	^thickness isZero 
		ifTrue: [block value: crfbotf]
		ifFalse: 
			[| answer crftopf n |
			answer := OrderedCollection new: crfbotf size + 2.
			crftopf := crfbotf collect: 
							[:rfbotf | 
							(rfbotf copy)
								at: 3 plusNumber: thickness;
								yourself].
			answer add: (block value: crfbotf).
			answer add: (block value: crftopf).
			n := crfbotf first = crfbotf last 
						ifTrue: [crfbotf size - 1]
						ifFalse: [crfbotf size].
			1 to: n
				do: 
					[:i | 
					answer 
						add: (StCAD.StGeo.DXFPolyline start: (crfbotf at: i) end: (crftopf at: i))].
			answer]</body>

<body package="CADSM-UI-DXF" selector="matrixWith:m:n:">matrixWith: cVertex m: m n: n 
	| aMatrix aStream |
	aMatrix := StCAD.StMath.StMFullMatrix new: m by: n.
	aStream := cVertex readStream.
	1 to: m
		do: 
			[:i | 
			1 to: n
				do: 
					[:j | 
					aMatrix 
						at: i
						and: j
						put: aStream next]].
	^aMatrix</body>

<body package="CADSM-UI-DXF" selector="openPolyfaceMeshWith:m:n:">openPolyfaceMeshWith: cVertex m: m n: n 
	| acVertex cFace cPolygon |
	acVertex := cVertex copyFrom: 1 to: m.
	cFace := cVertex copyFrom: m + 1 to: m + n.
	cPolygon := OrderedCollection new: n.
	1 to: n
		do: 
			[:i | 
			| aPolygon crfpf cFlag aFace |
			aPolygon := StCAD.StGeo.DXFPolyline new.
			crfpf := OrderedCollection new: 5.
			cFlag := OrderedCollection new: 5.
			aFace := cFace at: i.
			aFace do: 
					[:j | 
					crfpf add: (acVertex at: j abs).
					cFlag add: j positive].
			crfpf add: crfpf first.
			aPolygon rfpointsf: crfpf.
			aPolygon cFlag: cFlag.
			cPolygon add: aPolygon].
	^cPolygon</body>

<body package="CADSM-UI-DXF" selector="openPolygonMeshWith:m:n:">openPolygonMeshWith: cVertex m: m n: n 
	| aMatrix cPolygon aPolygon crfpf |
	aMatrix := self 
				matrixWith: cVertex
				m: m
				n: n.
	cPolygon := OrderedCollection new: (m - 1) * (n - 1).
	1 to: m - 1
		do: 
			[:i | 
			1 to: n - 1
				do: 
					[:j | 
					aPolygon := StCAD.StGeo.DXFPolyline new.
					crfpf := OrderedCollection new: 10.
					crfpf add: (aMatrix at: i and: j).
					crfpf add: (aMatrix at: i + 1 and: j).
					crfpf add: (aMatrix at: i + 1 and: j + 1).
					crfpf add: (aMatrix at: i and: j + 1).
					crfpf add: crfpf first.
					aPolygon rfpointsf: crfpf.
					cPolygon add: aPolygon]].
	^cPolygon</body>

<body package="CADSM-UI-DXF" selector="openPolylineWith:">openPolylineWith: cVertex 
	| aPolygon |
	aPolygon := StCAD.StGeo.DXFPolyline new.
	aPolygon rfpointsf: cVertex.
	^aPolygon</body>

<body package="CADSM-UI-DXF" selector="POLYLINE">POLYLINE
	| markName flag m n x y z extrudeX extrudeY extrudeZ cVertex cBlock isClosedPolylineOrClosedM hasCurveFitVertex hasSplineFitVertex isPolyline isPolygonMesh isClosedN isPolyfaceMesh hasLinePattern newItem block |
	markName := mark printString.
	aLayer := '0'.
	iColor := 256.
	flag := m := n := 0.
	x := y := z := 0.
	extrudeX := extrudeY := 0.
	extrudeZ := 1.
	cVertex := OrderedCollection new: 10.
	cBlock := IdentityDictionary new: 10.
	cBlock at: 0
		put: 
			[self parse: dataString.
			cVertex add: aItem value].
	cBlock at: 8 put: [aLayer := dataString].
	cBlock at: 10 put: [x := dataNumber * lengthUnit].
	cBlock at: 20 put: [y := dataNumber * lengthUnit].
	cBlock at: 30 put: [z := dataNumber * lengthUnit].
	cBlock at: 62 put: [iColor := dataNumber].
	cBlock at: 70 put: [flag := dataNumber].
	cBlock at: 71 put: [m := dataNumber].
	cBlock at: 72 put: [n := dataNumber].
	cBlock at: 210 put: [extrudeX := dataNumber].
	cBlock at: 220 put: [extrudeY := dataNumber].
	cBlock at: 230 put: [extrudeZ := dataNumber].
	
	[self nextPair.
	self checkEOFin: 'POLYLINE'.
	self isSEQEND] 
			whileFalse: [(cBlock at: groupCode) value].
	isClosedPolylineOrClosedM := (flag bitAt: 1) = 1.
	hasCurveFitVertex := (flag bitAt: 2) = 1.
	hasSplineFitVertex := (flag bitAt: 3) = 1.
	isPolyline := (flag bitAt: 4) = 1.
	isPolygonMesh := (flag bitAt: 5) = 1.
	isClosedN := (flag bitAt: 6) = 1.
	isPolyfaceMesh := (flag bitAt: 7) = 1.
	hasLinePattern := (flag bitAt: 8) = 1.
	newItem := isPolyline 
				ifTrue: 
					[isClosedPolylineOrClosedM 
						ifTrue: [self closedPolylineWith: cVertex]
						ifFalse: [self openPolylineWith: cVertex]]
				ifFalse: 
					[isPolygonMesh 
						ifTrue: 
							[isClosedPolylineOrClosedM 
								ifTrue: 
									[isClosedN 
										ifTrue: 
											[self 
												closedMNPolygonMeshWith: cVertex
												m: m
												n: n]
										ifFalse: 
											[self 
												closedMPolygonMeshWith: cVertex
												m: m
												n: n]]
								ifFalse: 
									[isClosedN 
										ifTrue: 
											[self 
												closedNPolygonMeshWith: cVertex
												m: m
												n: n]
										ifFalse: 
											[self 
												openPolygonMeshWith: cVertex
												m: m
												n: n]]]
						ifFalse: 
							[isPolyfaceMesh 
								ifTrue: 
									[self 
										openPolyfaceMeshWith: cVertex
										m: m
										n: n]
								ifFalse: 
									[isClosedPolylineOrClosedM 
										ifTrue: [self closedPolylineWith: cVertex]
										ifFalse: 
											[hasCurveFitVertex 
												ifTrue: [self openPolylineWith: cVertex]
												ifFalse: 
													[hasSplineFitVertex 
														ifTrue: [self openPolylineWith: cVertex]
														ifFalse: [hasLinePattern ifTrue: [self halt] ifFalse: [self halt]]]]]]].
	block := 
			[:graphic | 
			| rFfF aARot |
			graphic name: markName.
			self setColorFor: graphic.
			(x = 0 and: 
					[y = 0 
						and: [z = 0 and: [extrudeX = 0 and: [extrudeY = 0 and: [extrudeZ = 1]]]]]) 
				ifFalse: 
					[rFfF := x yd: y zd: z.
					aARot := self aAfromExtrusion: (extrudeX yd: extrudeY zd: extrudeZ).
					graphic refFrame rFfF: (aARot timesFullColumn: rFfF) aAFf: aARot]].
	newItem isSequenceable 
		ifTrue: [newItem do: block]
		ifFalse: [block value: newItem].
	aItem := aLayer -&gt; newItem.
	self count: #polyline.
	^true</body>

<body package="CADSM-UI-DXF" selector="POLYLINE1">POLYLINE1
	| markName flag m n extrudeX extrudeY extrudeZ cVertex cBlock x y z newItem block rFfF aARot |
	markName := mark printString.
	aLayer := '0'.
	iColor := 256.
	flag := m := n := 0.
	x := y := z := 0.
	extrudeX := extrudeY := 0.
	extrudeZ := 1.
	cVertex := OrderedCollection new: 10.
	cBlock := IdentityDictionary new: 10.
	cBlock at: 0
		put: 
			[self parse: dataString.
			cVertex add: aItem value].
	cBlock at: 8 put: [aLayer := dataString].
	cBlock at: 10 put: [x := dataNumber * lengthUnit].
	cBlock at: 20 put: [y := dataNumber * lengthUnit].
	cBlock at: 30 put: [z := dataNumber * lengthUnit].
	cBlock at: 62 put: [iColor := dataNumber].
	cBlock at: 70 put: [flag := dataNumber].
	cBlock at: 71 put: [m := dataNumber].
	cBlock at: 72 put: [n := dataNumber].
	cBlock at: 210 put: [extrudeX := dataNumber].
	cBlock at: 220 put: [extrudeY := dataNumber].
	cBlock at: 230 put: [extrudeZ := dataNumber].
	
	[self nextPair.
	self checkEOFin: 'POLYLINE'.
	self isSEQEND] 
			whileFalse: [(cBlock at: groupCode) value].
	cBlock := IdentityDictionary new: 10.
	cBlock at: 1
		put: 
			[m = 0 
				ifTrue: [self closedPolylineWith: cVertex]
				ifFalse: 
					[self 
						closedMPolygonMeshWith: cVertex
						m: m
						n: n]].
	cBlock at: 2 put: [self halt].
	cBlock at: 4 put: [self halt].
	cBlock at: 8 put: [self openPolylineWith: cVertex].
	cBlock at: 16
		put: 
			[self 
				openPolygonMeshWith: cVertex
				m: m
				n: n].
	cBlock at: 32
		put: 
			[self 
				closedNPolygonMeshWith: cVertex
				m: m
				n: n].
	cBlock at: 48
		put: 
			[self 
				closedMNPolygonMeshWith: cVertex
				m: m
				n: n].
	cBlock at: 64
		put: 
			[self 
				openPolyfaceMeshWith: cVertex
				m: m
				n: n].
	cBlock at: 128 put: [self halt].
	newItem := (cBlock at: flag) value.
	block := 
			[:graphic | 
			graphic name: markName.
			self setColorFor: graphic.
			(x = 0 and: 
					[y = 0 
						and: [z = 0 and: [extrudeX = 0 and: [extrudeY = 0 and: [extrudeZ = 1]]]]]) 
				ifFalse: 
					[rFfF := x yd: y zd: z.
					aARot := self aAfromExtrusion: (extrudeX yd: extrudeY zd: extrudeZ).
					graphic refFrame rFfF: (aARot timesFullColumn: rFfF) aAFf: aARot]].
	newItem isSequenceable 
		ifTrue: [newItem do: block]
		ifFalse: [block value: newItem].
	aItem := aLayer -&gt; newItem.
	self count: #polyline.
	^true</body>

<body package="CADSM-UI-DXF" selector="setColorFor:">setColorFor: graphic 
	"To do: how to handle negative iColor and background color of screen."

	iColor = 256 ifTrue: [iColor := self iColorOfLayer: aLayer].
	iColor &gt; 0 
		ifTrue: [graphic aColor: (self paintColor: iColor)]
		ifFalse: [graphic aColor: SymbolicPaint background]</body>

<body package="CADSM-UI-DXF" selector="SOLID">SOLID
	| markName x y z x2 y2 z2 x3 y3 z3 x4 y4 z4 cBlock crfpf newItem |
	markName := mark printString.
	aLayer := '0'.
	iColor := 256.
	x := y := z := 0.
	x2 := y2 := z2 := 0.
	x3 := y3 := z3 := 0.
	x4 := y4 := z4 := 0.
	cBlock := IdentityDictionary new: 10.
	cBlock at: 2 put: [aLayer := dataString].
	cBlock at: 10 put: [x := dataNumber * lengthUnit].
	cBlock at: 20 put: [y := dataNumber * lengthUnit].
	cBlock at: 30 put: [z := dataNumber * lengthUnit].
	cBlock at: 11 put: [x2 := dataNumber * lengthUnit].
	cBlock at: 21 put: [y2 := dataNumber * lengthUnit].
	cBlock at: 31 put: [z2 := dataNumber * lengthUnit].
	cBlock at: 12 put: [x3 := dataNumber * lengthUnit].
	cBlock at: 22 put: [y3 := dataNumber * lengthUnit].
	cBlock at: 32 put: [z3 := dataNumber * lengthUnit].
	cBlock at: 13 put: [x4 := dataNumber * lengthUnit].
	cBlock at: 23 put: [y4 := dataNumber * lengthUnit].
	cBlock at: 33 put: [z4 := dataNumber * lengthUnit].
	cBlock at: 62 put: [iColor := dataNumber].
	
	[self nextPair.
	self checkEOFin: 'SOLID'.
	groupCode = 0] 
			whileFalse: [(cBlock at: groupCode) value].
	crfpf := OrderedCollection new: 5.
	crfpf addLast: (x yd: y zd: z).
	crfpf addLast: (x2 yd: y2 zd: z2).
	crfpf addLast: (x3 yd: y3 zd: z3).
	crfpf addLast: (x4 yd: y4 zd: z4).
	crfpf addLast: crfpf first.
	newItem := StCAD.StGeo.DXFPolyline new.
	newItem rfpointsf: crfpf.
	self unNextPair.
	newItem name: markName.
	self setColorFor: newItem.
	aItem := aLayer -&gt; newItem.
	self count: #SOLID.
	^true</body>

<body package="CADSM-UI-DXF" selector="VERTEX">VERTEX
	| flag x y z cBlock v1 v2 v3 v4 newItem |
	aLayer := '0'.
	iColor := 256.
	flag := 32.
	x := y := z := 0.0.
	cBlock := IdentityDictionary new: 10.
	cBlock at: 8 put: [aLayer := dataString].
	cBlock at: 10 put: [x := dataNumber * lengthUnit].
	cBlock at: 20 put: [y := dataNumber * lengthUnit].
	cBlock at: 30 put: [z := dataNumber * lengthUnit].
	cBlock at: 62 put: [iColor := dataNumber].
	cBlock at: 70 put: [flag := dataNumber].
	cBlock at: 71 put: [v1 := dataNumber].
	cBlock at: 72 put: [v2 := dataNumber].
	cBlock at: 73 put: [v3 := dataNumber].
	cBlock at: 74 put: [v4 := dataNumber].
	
	[self nextPair.
	self checkEOFin: 'VERTEX'.
	groupCode = 0] 
			whileFalse: [(cBlock at: groupCode) value].
	newItem := flag == 128 
				ifTrue: 
					[| cVertex block |
					cVertex := OrderedCollection new: 4.
					block := [:v | cVertex add: v].
					v1 ifNotNil: block.
					v2 ifNotNil: block.
					v3 ifNotNil: block.
					v4 ifNotNil: block.
					cVertex]
				ifFalse: [x yd: y zd: z].
	aItem := aLayer -&gt; newItem.
	self count: #vertex.
	self unNextPair.
	^true</body>
</methods>

<methods>
<class-id>CADSM.UI.DXF.DXFParser</class-id> <category>scanning</category>

<body package="CADSM-UI-DXF" selector="nextPair">nextPair
	mark := source position.
	source atEnd 
		ifTrue: 
			[dataKey := #eof.
			dataString := 'EOF'.
			^dataKey -&gt; dataString].
	dataKey := source upTo: self lineSeparator.
	lines := lines + 1.
	dataKey := dataKey select: [:x | x isDigit].
	groupCode := dataKey asNumber.
	dataString := source upTo: self lineSeparator.
	lines := lines + 1.
	dataNumber := groupCode = 310 
				ifTrue: [0]
				ifFalse: [dataString importNumber].
	^dataKey -&gt; dataString</body>
</methods>

<methods>
<class-id>CADSM.UI.DXF.DXFParser</class-id> <category>initialize-release</category>

<body package="CADSM-UI-DXF" selector="initialize">initialize
	lengthUnit := nil.
	cLayer := Dictionary new: 20.
	cBLOCK := Dictionary new: 20.
	cCount := Dictionary new: 10</body>
</methods>

<methods>
<class-id>CADSM.UI.DXF.DXFParser</class-id> <category>accessing</category>

<body package="CADSM-UI-DXF" selector="aAfromExtrusion:">aAfromExtrusion: argzDir 
	| zDir oneOver64 |
	zDir := argzDir copy normalizeSelf.
	oneOver64 := (1 / 64) asDouble.
	^(zDir x abs &lt; oneOver64 and: [zDir y abs &lt; oneOver64]) 
		ifTrue: [StCAD.StMath.StMFullMatrix rotationMatrixFromzDir: zDir yDir: (0 yd: 1 zd: 0)]
		ifFalse: [StCAD.StMath.StMFullMatrix rotationMatrixFromzDir: zDir yDir: (0 yd: 0 zd: 1)]</body>

<body package="CADSM-UI-DXF" selector="aAssembly">aAssembly
	^aAssembly</body>

<body package="CADSM-UI-DXF" selector="aAssembly:">aAssembly: anObject
	aAssembly := anObject</body>

<body package="CADSM-UI-DXF" selector="cLayerColor">cLayerColor
	cLayerColor isNil ifTrue: [cLayerColor := Dictionary new: 50].
	^cLayerColor</body>

<body package="CADSM-UI-DXF" selector="count:">count: aSymbol 
	"self debug: 'count: ', aSymbol."

	(cCount includesKey: aSymbol) ifFalse: [cCount at: aSymbol put: 0].
	cCount at: aSymbol put: (cCount at: aSymbol) + 1</body>

<body package="CADSM-UI-DXF" selector="cVar">cVar
	cVar isNil ifTrue: [cVar := Dictionary new: 10].
	^cVar</body>

<body package="CADSM-UI-DXF" selector="iColorOfLayer:">iColorOfLayer: aString 
	^self cLayerColor at: aString ifAbsent: [0]</body>

<body package="CADSM-UI-DXF" selector="lengthUnitAt:">lengthUnitAt: iCode 
	| m unitless inch microinch mil ft yard mile angstrom nm micron mm cm dm dam hm km Gm AU ly pc aDict |
	m := 1.0d.
	unitless := [self checkForUnits].
	inch := 0.0254d * m.
	microinch := 1.0d-6 * inch.
	mil := 1.0d-3 * inch.
	ft := 12 * inch.
	yard := 3 * ft.
	mile := 5280 * ft.
	angstrom := 1.0d-10 * m.
	nm := 1.0d-9 * m.
	micron := 1.0d-6 * m.
	mm := 0.001d * m.
	cm := 0.01d * m.
	dm := 0.1d * m.
	dam := 10.0d * m.
	hm := 100.0d * m.
	km := 1000.0d * m.
	Gm := 1.0d9 * m.
	AU := 1.496d11 * m.
	ly := 9.463d15 * m.
	pc := 3.086d16 * m.
	aDict := IdentityDictionary new: 20.
	aDict at: 0 put: unitless.
	aDict at: 1 put: inch.
	aDict at: 2 put: ft.
	aDict at: 3 put: mile.
	aDict at: 4 put: mm.
	aDict at: 5 put: cm.
	aDict at: 6 put: m.
	aDict at: 7 put: km.
	aDict at: 8 put: microinch.
	aDict at: 9 put: mil.
	aDict at: 10 put: yard.
	aDict at: 11 put: angstrom.
	aDict at: 12 put: nm.
	aDict at: 13 put: micron.
	aDict at: 14 put: dm.
	aDict at: 15 put: dam.
	aDict at: 16 put: hm.
	aDict at: 17 put: Gm.
	aDict at: 18 put: AU.
	aDict at: 19 put: ly.
	aDict at: 20 put: pc.
	^(aDict at: iCode) value</body>

<body package="CADSM-UI-DXF" selector="nSegment">nSegment
	^36</body>

<body package="CADSM-UI-DXF" selector="paintColor:">paintColor: anInteger 
	| index |
	index := anInteger.
	(index between: 1 and: 255) ifFalse: [index := 7].
	^self class colorAt: index</body>

<body package="CADSM-UI-DXF" selector="setLayer:iColor:">setLayer: aName iColor: index 
	self cLayerColor at: aName put: index</body>
</methods>

<methods>
<class-id>CADSM.UI.DXF.DXFParser</class-id> <category>parsing</category>

<body package="CADSM-UI-DXF" selector="BLOCK">BLOCK
	
	[self nextPair.
	self checkEOFin: 'BLOCK'.
	self isENDBLK] whileFalse: 
				[(groupCode = 3 and: [dataString first ~= $$]) 
					ifTrue: [self newDxfDefinition: dataString]].
	self unNextPair.
	^true</body>

<body package="CADSM-UI-DXF" selector="BLOCKS">BLOCKS
	self checkForUnits.
	
	[self nextPair.
	self checkEOFin: 'BLOCKS'.
	self isENDSEC] 
			whileFalse: [groupCode = 0 ifTrue: [self parse: dataString]].
	self unNextPair</body>

<body package="CADSM-UI-DXF" selector="CECOLOR">CECOLOR
	"$CECOLOR indicates... how to treat color
		0 - BYBLOCK
		256 - BYLAYER"

	
	| nn newItem |
	[self nextPair.
	dataString = 'EOF' ifTrue: [self expected: '$CECOLOR'].
	groupCode = 0 or: [groupCode = 9]] 
			whileFalse: [groupCode = 62 ifTrue: [nn := dataNumber]].
	newItem := nn.
	aItem := newItem.
	self unNextPair.
	^true</body>

<body package="CADSM-UI-DXF" selector="checkEOFin:">checkEOFin: aString 
	self isEOF ifTrue: [self expected: aString]</body>

<body package="CADSM-UI-DXF" selector="checkForUnits">checkForUnits
	| m inch ft yard mile mm cm km aDict unit dm |
	lengthUnit ifNil: 
			[m := 1.0d.
			inch := 0.0254d * m.
			ft := 12 * inch.
			yard := 3 * ft.
			mile := 5280 * ft.
			mm := 0.001d * m.
			cm := 0.01d * m.
			dm := 0.1d * m.
			km := 1000.0d * m.
			aDict := Dictionary new: 10.
			aDict at: #inch put: inch.
			aDict at: #feet put: ft.
			aDict at: #yard put: yard.
			aDict at: #mile put: mile.
			aDict at: #millimeter put: mm.
			aDict at: #centimeter put: cm.
			aDict at: #decimeter put: dm.
			aDict at: #meter put: m.
			aDict at: #kilometer put: km.
			aDict at: #custom
				put: 
					[| answer |
					
					[answer := Dialog prompt: 'How many meters is one custom unit?'
								defaultExpression: 1.
					answer isNil] 
							whileTrue.
					answer].
			
			[unit := Dialog 
						choose: 'Choose a length unit.'
						fromVerticallyAlignedButtonsWithLabels: #('inch' 'feet' 'yard' 'mile' 'millimeter' 'centimeter' 'decimeter' 'meter' 'kilometer' 'custom')
						values: #(#inch #feet #yard #mile #millimeter #centimeter #decimeter #meter #kilometer #custom)
						default: #millimeter.
			unit == #cancel] 
					whileTrue.
			lengthUnit := (aDict at: unit) value].
	^lengthUnit</body>

<body package="CADSM-UI-DXF" selector="CLASSES">CLASSES
	
	[self nextPair.
	self checkEOFin: 'CLASSES'.
	self isENDSEC] 
			whileFalse: [groupCode = 0 ifTrue: [self parse: dataString]].
	self unNextPair</body>

<body package="CADSM-UI-DXF" selector="ENTITIES">ENTITIES
	| aDXFBLOCK |
	self checkForUnits.
	aAssembly := StCAD.StGeo.GEOAssembly new.
	aAssembly name: 'DXFAssembly'.
	aDXFBLOCK := DXFBLOCK new.
	
	[self nextPair.
	self checkEOFin: 'ENTITIES'.
	self isENDSEC] whileFalse: 
				[groupCode = 0 
					ifTrue: 
						[self parse: dataString.
						aItem ifNotNil: 
								[| graphic |
								graphic := aItem value.
								(graphic isMemberOf: DXFBLOCK) not 
									ifTrue: 
										[graphic isSequenceable 
											ifTrue: [aDXFBLOCK addGraphics: graphic]
											ifFalse: [aDXFBLOCK addGraphic: graphic]]].
						self count: #entities]].
	self unNextPair.
	aDXFBLOCK calcBoundingBox.
	aDXFBLOCK aBoundingBox isDefined 
		ifTrue: 
			[| aPart aMassMarker rFfF aAFf |
			aPart := StCAD.StGeo.GEOPart new.
			aPart name: 'Part0'.
			aPart aDXFBLOCK: aDXFBLOCK.
			aMassMarker := StCAD.StGeo.GEOMassMarker new.
			aMassMarker name: 'MassMarker'.
			aMassMarker refFrame rFfF: aPart aDXFBLOCK aBoundingBox center
				aAFf: (StCAD.StMath.StMFullMatrix identity: 3).
			aPart aMassMarker: aMassMarker.
			rFfF := 0 yd: 0 zd: 0.
			aAFf := StCAD.StMath.StMFullMatrix identity: 3.
			aPart refFrame rFfF: rFfF aAFf: aAFf.
			aAssembly addAnyPart: aPart]</body>

<body package="CADSM-UI-DXF" selector="EXTMAX1">EXTMAX1
	"answer a 3d point"

	self readXYZ.
	self cVar at: 'EXTMAX' put: aItem.
	self count: #cVar</body>

<body package="CADSM-UI-DXF" selector="EXTMIN1">EXTMIN1
	"answer a 3d point"

	self readXYZ.
	self cVar at: 'EXTMIN' put: aItem.
	self count: #cVar</body>

<body package="CADSM-UI-DXF" selector="HEADER">HEADER
	
	[self nextPair.
	self checkEOFin: 'HEADER'.
	self isENDSEC] 
			whileFalse: [groupCode = 9 ifTrue: [self parse: dataString]].
	self unNextPair</body>

<body package="CADSM-UI-DXF" selector="INSUNITS">INSUNITS
	
	| iCode |
	[self nextPair.
	dataString = 'EOF' ifTrue: [self expected: 'INSUNITS code 70'].
	groupCode = 0 or: [groupCode = 9]] 
			whileFalse: [groupCode = 70 ifTrue: [iCode := dataNumber]].
	self unNextPair.
	aItem := iCode.
	self cVar at: 'INSUNITS' put: aItem.
	self count: #cVar.
	lengthUnit := self lengthUnitAt: iCode</body>

<body package="CADSM-UI-DXF" selector="isENDBLK">isENDBLK
	^groupCode = 0 and: [dataString = 'ENDBLK']</body>

<body package="CADSM-UI-DXF" selector="isENDSEC">isENDSEC
	^groupCode = 0 and: [dataString = 'ENDSEC']</body>

<body package="CADSM-UI-DXF" selector="isENDTAB">isENDTAB
	^groupCode = 0 and: [dataString = 'ENDTAB']</body>

<body package="CADSM-UI-DXF" selector="isEOF">isEOF
	^groupCode = 0 and: [dataString = 'EOF']</body>

<body package="CADSM-UI-DXF" selector="isSEQEND">isSEQEND
	^groupCode = 0 and: [dataString = 'SEQEND']</body>

<body package="CADSM-UI-DXF" selector="LAYER">LAYER
	| iColor name |
	iColor := 0.
	
	[self nextPair.
	dataString = 'EOF' ifTrue: [self expected: 'LAYER'].
	groupCode = 0] 
			whileFalse: 
				[groupCode = 62 ifTrue: [iColor := dataNumber].
				groupCode = 2 ifTrue: [name := dataString]].
	self setLayer: name iColor: iColor.
	self count: #layers.
	aItem := name -&gt; iColor.
	self unNextPair.
	^true</body>

<body package="CADSM-UI-DXF" selector="MEASUREMENT">MEASUREMENT
	| iCode |
	
	[self nextPair.
	dataString = 'EOF' ifTrue: [self expected: 'MEASUREMENT code 70'].
	groupCode = 0 or: [groupCode = 9]] 
			whileFalse: [groupCode = 70 ifTrue: [iCode := dataNumber]].
	self unNextPair.
	aItem := iCode.
	self cVar at: 'MEASUREMENT' put: aItem.
	self count: #cVar</body>

<body package="CADSM-UI-DXF" selector="MENU">MENU
	source upTo: self lineSeparator.
	source upTo: self lineSeparator</body>

<body package="CADSM-UI-DXF" selector="newDxfDefinition:">newDxfDefinition: aString 
	| aDXFBLOCK errorString graphic |
	aDXFBLOCK := DXFBLOCK new.
	errorString := #'BLOCK &lt;1s&gt;' &lt;&lt; #'CADSM.UI' expandMacrosWith: aString.
	
	[self nextPair.
	self checkEOFin: errorString.
	self isENDBLK] whileFalse: 
				[groupCode = 0 
					ifTrue: 
						[self parse: dataString.
						aItem ifNotNil: 
								[graphic := aItem value.
								graphic isSequenceable 
									ifTrue: [aDXFBLOCK addGraphics: graphic]
									ifFalse: [aDXFBLOCK addGraphic: graphic]]]].
	self unNextPair.
	self count: #names.
	aDXFBLOCK calcBoundingBox.
	cBLOCK at: aString put: aDXFBLOCK.
	^true</body>

<body package="CADSM-UI-DXF" selector="OBJECTS">OBJECTS
	
	[self nextPair.
	self checkEOFin: 'OBJECTS'.
	self isENDSEC] 
			whileFalse: [groupCode = 0 ifTrue: [self parse: dataString]].
	self count: #sections.
	self unNextPair</body>

<body package="CADSM-UI-DXF" selector="parse">parse
	
	[self nextPair.
	self isEOF] 
			whileFalse: [groupCode = 0 ifTrue: [self parse: dataString]]</body>

<body package="CADSM-UI-DXF" selector="parse1:">parse1: string 
	| char symbol |
	char := string first.
	symbol := ((char = $$ or: [char isDigit]) 
				ifTrue: [string copyFrom: 2 to: string size]
				ifFalse: [string]) asSymbol.
	self performIfCan: symbol else: [:arg | aItem := nil]</body>

<body package="CADSM-UI-DXF" selector="parse2:">parse2: string 
	| char symbol aSet |
	char := string first.
	symbol := ((char = $$ or: [char isDigit]) 
				ifTrue: [string copyFrom: 2 to: string size]
				ifFalse: [string]) asSymbol.
	aSet := Set new.
	aSet add: #CIRCLE.
	aSet add: #LWPOLYLINE.
	aSet add: #POLYLINE.
	aSet add: #DFACE.
	aSet add: #VERTEX.
	(aSet includes: symbol) 
		ifFalse: [self performIfCan: symbol else: [:arg | aItem := nil]]</body>

<body package="CADSM-UI-DXF" selector="parse:">parse: string 
	| char symbol |
	char := string first.
	symbol := ((char = $$ or: [char isDigit]) 
				ifTrue: [string copyFrom: 2 to: string size]
				ifFalse: [string]) asSymbol.
	self performIfCan: symbol else: [:arg | aItem := nil]</body>

<body package="CADSM-UI-DXF" selector="readXYZ">readXYZ
	"answer a 3d point"

	| x y z newItem |
	x := y := z := 0.0.
	
	[self nextPair.
	dataString = 'EOF' ifTrue: [self expected: 'xyz coordinates'].
	groupCode = 0 or: [groupCode = 9]] 
			whileFalse: 
				[groupCode = 10 ifTrue: [x := dataNumber * lengthUnit].
				groupCode = 20 ifTrue: [y := dataNumber * lengthUnit].
				groupCode = 30 ifTrue: [z := dataNumber * lengthUnit]].
	newItem := StCAD.StMath.StMFullColumn 
				with: x
				with: y
				with: z.
	aItem := newItem.
	self unNextPair.
	^true</body>

<body package="CADSM-UI-DXF" selector="SECTION">SECTION
"	self halt."
	
	[self nextPair.
	self checkEOFin: 'SECTION'.
	self isENDSEC] 
			whileFalse: [groupCode = 2 ifTrue: [self parse: dataString]].
	self count: #sections.
	self unNextPair</body>

<body package="CADSM-UI-DXF" selector="TABLE">TABLE
	
	[self nextPair.
	self checkEOFin: 'TABLE'.
	self isENDTAB] 
			whileFalse: [groupCode = 0 ifTrue: [self parse: dataString]].
	self unNextPair.
	^true</body>

<body package="CADSM-UI-DXF" selector="TABLES">TABLES
	
	[self nextPair.
	self checkEOFin: 'TABLES'.
	self isENDSEC] 
			whileFalse: [groupCode = 0 ifTrue: [self parse: dataString]].
	self unNextPair</body>
</methods>

<methods>
<class-id>CADSM.UI.DXF.DXFParser class</class-id> <category>instance creation</category>

<body package="CADSM-UI-DXF" selector="new">new
	^super new initialize</body>

<body package="CADSM-UI-DXF" selector="on:">on: aFilename 
	"DXFParser on: 'd:\data\dxf\awk\wing1t.dxf'"

	| scanner stream |
	stream := aFilename asFilename readStream.
	stream lineEndAuto.
	scanner := self new.
	scanner on: stream.
	^scanner</body>

<body package="CADSM-UI-DXF" selector="parse:">parse: aFilename 
	| parser stream |
	stream := aFilename asFilename readStream.
	^
	[stream lineEndAuto.
	parser := self new.
	parser on: stream.
	parser parse] 
			ensure: [stream close]</body>
</methods>

<methods>
<class-id>CADSM.UI.DXF.DXFParser class</class-id> <category>accessing</category>

<body package="CADSM-UI-DXF" selector="colorAt:">colorAt: anInteger 
	| index |
	index := anInteger.
	ColorTable ifNil: [self initColorTable].
	^(index between: 1 and: 255) 
		ifTrue: [ColorTable at: index]
		ifFalse: [ColorValue black]</body>

<body package="CADSM-UI-DXF" selector="flushColors">flushColors
	"JunDXFParser flushColors"

	ColorTable := nil</body>

<body package="CADSM-UI-DXF" selector="initColorTable">initColorTable
	self initColorTable50.
	self initColorTable100.
	self initColorTable150.
	self initColorTable200.
	self initColorTable255.
	^ColorTable</body>

<body package="CADSM-UI-DXF" selector="initColorTable100">initColorTable100
	ColorTable at: 50 put: ColorValue yellow.
	ColorTable at: 51
		put: (ColorValue 
				red: 1.0
				green: 0.995971
				blue: 0.388231).
	ColorTable at: 52
		put: (ColorValue 
				red: 0.615676
				green: 0.599927
				blue: 0.00781345).
	ColorTable at: 53
		put: (ColorValue 
				red: 0.60774
				green: 0.603833
				blue: 0.384202).
	ColorTable at: 54
		put: (ColorValue 
				red: 0.388231
				green: 0.396044
				blue: 0.00781345).
	ColorTable at: 55
		put: (ColorValue 
				red: 0.384202
				green: 0.396044
				blue: 0.188133).
	ColorTable at: 56
		put: (ColorValue 
				red: 0.196069
				green: 0.188133
				blue: 0.0).
	ColorTable at: 57 put: (ColorValue brightness: 0.188133).
	ColorTable at: 58
		put: (ColorValue 
				red: 0.196069
				green: 0.188133
				blue: 0.0).
	ColorTable at: 59
		put: (ColorValue 
				red: 0.196069
				green: 0.188133
				blue: 0.0).
	ColorTable at: 60
		put: (ColorValue 
				red: 0.803809
				green: 1.0
				blue: 0.0).
	ColorTable at: 61
		put: (ColorValue 
				red: 0.807838
				green: 1.0
				blue: 0.388231).
	ColorTable at: 62
		put: (ColorValue 
				red: 0.388231
				green: 0.603833
				blue: 0.00390673).
	ColorTable at: 63
		put: (ColorValue 
				red: 0.60774
				green: 0.603833
				blue: 0.384202).
	ColorTable at: 64
		put: (ColorValue 
				red: 0.388231
				green: 0.396044
				blue: 0.00781345).
	ColorTable at: 65
		put: (ColorValue 
				red: 0.384202
				green: 0.396044
				blue: 0.188133).
	ColorTable at: 66
		put: (ColorValue 
				red: 0.196069
				green: 0.188133
				blue: 0.0).
	ColorTable at: 67 put: (ColorValue brightness: 0.188133).
	ColorTable at: 68
		put: (ColorValue 
				red: 0.196069
				green: 0.188133
				blue: 0.0).
	ColorTable at: 69
		put: (ColorValue 
				red: 0.196069
				green: 0.188133
				blue: 0.0).
	ColorTable at: 70
		put: (ColorValue 
				red: 0.388231
				green: 0.995971
				blue: 0.0).
	ColorTable at: 71
		put: (ColorValue 
				red: 0.807838
				green: 1.0
				blue: 0.388231).
	ColorTable at: 72
		put: (ColorValue 
				red: 0.388231
				green: 0.603833
				blue: 0.00390673).
	ColorTable at: 73
		put: (ColorValue 
				red: 0.392138
				green: 0.599927
				blue: 0.388231).
	ColorTable at: 74
		put: (ColorValue 
				red: 0.19204
				green: 0.396044
				blue: 0.0).
	ColorTable at: 75
		put: (ColorValue 
				red: 0.384202
				green: 0.396044
				blue: 0.188133).
	ColorTable at: 76
		put: (ColorValue 
				red: 0.196069
				green: 0.188133
				blue: 0.0).
	ColorTable at: 77 put: (ColorValue brightness: 0.188133).
	ColorTable at: 78
		put: (ColorValue 
				red: 0.0
				green: 0.188133
				blue: 0.0).
	ColorTable at: 79
		put: (ColorValue 
				red: 0.196069
				green: 0.188133
				blue: 0.0).
	ColorTable at: 80
		put: (ColorValue 
				red: 0.19204
				green: 1.0
				blue: 0.0).
	ColorTable at: 81
		put: (ColorValue 
				red: 0.611647
				green: 1.0
				blue: 0.392138).
	ColorTable at: 82
		put: (ColorValue 
				red: 0.19204
				green: 0.603833
				blue: 0.00781345).
	ColorTable at: 83
		put: (ColorValue 
				red: 0.392138
				green: 0.599927
				blue: 0.388231).
	ColorTable at: 84
		put: (ColorValue 
				red: 0.19204
				green: 0.396044
				blue: 0.0).
	ColorTable at: 85
		put: (ColorValue 
				red: 0.384202
				green: 0.396044
				blue: 0.188133).
	ColorTable at: 86
		put: (ColorValue 
				red: 0.0
				green: 0.188133
				blue: 0.0).
	ColorTable at: 87 put: (ColorValue brightness: 0.188133).
	ColorTable at: 88
		put: (ColorValue 
				red: 0.0
				green: 0.188133
				blue: 0.0).
	ColorTable at: 89
		put: (ColorValue 
				red: 0.0
				green: 0.188133
				blue: 0.0).
	ColorTable at: 90
		put: (ColorValue 
				red: 0.0
				green: 1.0
				blue: 0.00390673).
	ColorTable at: 91
		put: (ColorValue 
				red: 0.392138
				green: 1.0
				blue: 0.388231).
	ColorTable at: 92
		put: (ColorValue 
				red: 0.00390673
				green: 0.599927
				blue: 0.00781345).
	ColorTable at: 93
		put: (ColorValue 
				red: 0.399951
				green: 0.599927
				blue: 0.384202).
	ColorTable at: 94
		put: (ColorValue 
				red: 0.0
				green: 0.392138
				blue: 0.00390673).
	ColorTable at: 95
		put: (ColorValue 
				red: 0.19204
				green: 0.399951
				blue: 0.196069).
	ColorTable at: 96
		put: (ColorValue 
				red: 0.0
				green: 0.188133
				blue: 0.0).
	ColorTable at: 97 put: (ColorValue brightness: 0.188133).
	ColorTable at: 98
		put: (ColorValue 
				red: 0.0
				green: 0.188133
				blue: 0.0).
	ColorTable at: 99
		put: (ColorValue 
				red: 0.0
				green: 0.184227
				blue: 0.00781345)</body>

<body package="CADSM-UI-DXF" selector="initColorTable150">initColorTable150
	ColorTable at: 100
		put: (ColorValue 
				red: 0.0
				green: 1.0
				blue: 0.19204).
	ColorTable at: 101
		put: (ColorValue 
				red: 0.388231
				green: 1.0
				blue: 0.619582).
	ColorTable at: 102
		put: (ColorValue 
				red: 0.00781345
				green: 0.599927
				blue: 0.188133).
	ColorTable at: 103
		put: (ColorValue 
				red: 0.392138
				green: 0.599927
				blue: 0.388231).
	ColorTable at: 104
		put: (ColorValue 
				red: 0.00390673
				green: 0.396044
				blue: 0.19204).
	ColorTable at: 105
		put: (ColorValue 
				red: 0.19204
				green: 0.396044
				blue: 0.388231).
	ColorTable at: 106
		put: (ColorValue 
				red: 0.0
				green: 0.188133
				blue: 0.0).
	ColorTable at: 107 put: (ColorValue brightness: 0.188133).
	ColorTable at: 108
		put: (ColorValue 
				red: 0.0
				green: 0.188133
				blue: 0.0).
	ColorTable at: 109
		put: (ColorValue 
				red: 0.0
				green: 0.188133
				blue: 0.0).
	ColorTable at: 110
		put: (ColorValue 
				red: 0.0
				green: 1.0
				blue: 0.388231).
	ColorTable at: 111
		put: (ColorValue 
				red: 0.388231
				green: 1.0
				blue: 0.811745).
	ColorTable at: 112
		put: (ColorValue 
				red: 0.0
				green: 0.60774
				blue: 0.384202).
	ColorTable at: 113
		put: (ColorValue 
				red: 0.392138
				green: 0.599927
				blue: 0.388231).
	ColorTable at: 114
		put: (ColorValue 
				red: 0.00390673
				green: 0.396044
				blue: 0.19204).
	ColorTable at: 115
		put: (ColorValue 
				red: 0.19204
				green: 0.396044
				blue: 0.388231).
	ColorTable at: 116
		put: (ColorValue 
				red: 0.0
				green: 0.188133
				blue: 0.196069).
	ColorTable at: 117 put: (ColorValue brightness: 0.188133).
	ColorTable at: 118
		put: (ColorValue 
				red: 0.0
				green: 0.188133
				blue: 0.0).
	ColorTable at: 119
		put: (ColorValue 
				red: 0.0
				green: 0.188133
				blue: 0.196069).
	ColorTable at: 120
		put: (ColorValue 
				red: 0.0
				green: 1.0
				blue: 0.811745).
	ColorTable at: 121
		put: (ColorValue 
				red: 0.388231
				green: 1.0
				blue: 0.811745).
	ColorTable at: 122
		put: (ColorValue 
				red: 0.0
				green: 0.60774
				blue: 0.384202).
	ColorTable at: 123
		put: (ColorValue 
				red: 0.388231
				green: 0.60774
				blue: 0.611647).
	ColorTable at: 124
		put: (ColorValue 
				red: 0.00781345
				green: 0.392138
				blue: 0.388231).
	ColorTable at: 125
		put: (ColorValue 
				red: 0.19204
				green: 0.396044
				blue: 0.388231).
	ColorTable at: 126
		put: (ColorValue 
				red: 0.0
				green: 0.188133
				blue: 0.196069).
	ColorTable at: 127 put: (ColorValue brightness: 0.188133).
	ColorTable at: 128
		put: (ColorValue 
				red: 0.0
				green: 0.188133
				blue: 0.196069).
	ColorTable at: 129
		put: (ColorValue 
				red: 0.0
				green: 0.188133
				blue: 0.196069).
	ColorTable at: 130 put: ColorValue cyan.
	ColorTable at: 131
		put: (ColorValue 
				red: 0.388231
				green: 1.0
				blue: 0.995971).
	ColorTable at: 132
		put: (ColorValue 
				red: 0.00390673
				green: 0.599927
				blue: 0.611647).
	ColorTable at: 133
		put: (ColorValue 
				red: 0.388231
				green: 0.60774
				blue: 0.611647).
	ColorTable at: 134
		put: (ColorValue 
				red: 0.0117202
				green: 0.396044
				blue: 0.380295).
	ColorTable at: 135
		put: (ColorValue 
				red: 0.19204
				green: 0.396044
				blue: 0.388231).
	ColorTable at: 136
		put: (ColorValue 
				red: 0.0
				green: 0.188133
				blue: 0.196069).
	ColorTable at: 137 put: (ColorValue brightness: 0.188133).
	ColorTable at: 138
		put: (ColorValue 
				red: 0.0
				green: 0.188133
				blue: 0.196069).
	ColorTable at: 139
		put: (ColorValue 
				red: 0.0117202
				green: 0.184227
				blue: 0.199976).
	ColorTable at: 140
		put: (ColorValue 
				red: 0.00390673
				green: 0.811745
				blue: 1.0).
	ColorTable at: 141
		put: (ColorValue 
				red: 0.388231
				green: 0.811745
				blue: 0.995971).
	ColorTable at: 142
		put: (ColorValue 
				red: 0.0
				green: 0.396044
				blue: 0.615676).
	ColorTable at: 143
		put: (ColorValue 
				red: 0.388231
				green: 0.60774
				blue: 0.611647).
	ColorTable at: 144
		put: (ColorValue 
				red: 0.00781345
				green: 0.392138
				blue: 0.388231).
	ColorTable at: 145
		put: (ColorValue 
				red: 0.19204
				green: 0.396044
				blue: 0.388231).
	ColorTable at: 146
		put: (ColorValue 
				red: 0.0
				green: 0.188133
				blue: 0.196069).
	ColorTable at: 147 put: (ColorValue brightness: 0.188133).
	ColorTable at: 148
		put: (ColorValue 
				red: 0.0
				green: 0.188133
				blue: 0.196069).
	ColorTable at: 149
		put: (ColorValue 
				red: 0.0
				green: 0.188133
				blue: 0.196069)</body>

<body package="CADSM-UI-DXF" selector="initColorTable200">initColorTable200
	ColorTable at: 150
		put: (ColorValue 
				red: 0.0
				green: 0.392138
				blue: 1.0).
	ColorTable at: 151
		put: (ColorValue 
				red: 0.388231
				green: 0.811745
				blue: 0.995971).
	ColorTable at: 152
		put: (ColorValue 
				red: 0.0
				green: 0.396044
				blue: 0.615676).
	ColorTable at: 153
		put: (ColorValue 
				red: 0.396044
				green: 0.392138
				blue: 0.615676).
	ColorTable at: 154
		put: (ColorValue 
				red: 0.0
				green: 0.184227
				blue: 0.388231).
	ColorTable at: 155
		put: (ColorValue 
				red: 0.19204
				green: 0.396044
				blue: 0.388231).
	ColorTable at: 156
		put: (ColorValue 
				red: 0.0
				green: 0.188133
				blue: 0.196069).
	ColorTable at: 157 put: (ColorValue brightness: 0.188133).
	ColorTable at: 158
		put: (ColorValue 
				red: 0.0
				green: 0.00390673
				blue: 0.19204).
	ColorTable at: 159
		put: (ColorValue 
				red: 0.0
				green: 0.196069
				blue: 0.196069).
	ColorTable at: 160
		put: (ColorValue 
				red: 0.0117202
				green: 0.184227
				blue: 1.0).
	ColorTable at: 161
		put: (ColorValue 
				red: 0.388231
				green: 0.603833
				blue: 1.0).
	ColorTable at: 162
		put: (ColorValue 
				red: 0.0
				green: 0.188133
				blue: 0.611647).
	ColorTable at: 163
		put: (ColorValue 
				red: 0.392138
				green: 0.396044
				blue: 0.611647).
	ColorTable at: 164
		put: (ColorValue 
				red: 0.0
				green: 0.184227
				blue: 0.388231).
	ColorTable at: 165
		put: (ColorValue 
				red: 0.19204
				green: 0.396044
				blue: 0.388231).
	ColorTable at: 166
		put: (ColorValue 
				red: 0.0
				green: 0.00390673
				blue: 0.19204).
	ColorTable at: 167 put: (ColorValue brightness: 0.188133).
	ColorTable at: 168
		put: (ColorValue 
				red: 0.0
				green: 0.00390673
				blue: 0.19204).
	ColorTable at: 169
		put: (ColorValue 
				red: 0.0
				green: 0.00390673
				blue: 0.19204).
	ColorTable at: 170
		put: (ColorValue 
				red: 0.0
				green: 0.00390673
				blue: 0.980344).
	ColorTable at: 171
		put: (ColorValue 
				red: 0.388231
				green: 0.396044
				blue: 0.995971).
	ColorTable at: 172
		put: (ColorValue 
				red: 0.0
				green: 0.0
				blue: 0.611647).
	ColorTable at: 173
		put: (ColorValue 
				red: 0.396044
				green: 0.392138
				blue: 0.615676).
	ColorTable at: 174
		put: (ColorValue 
				red: 0.0
				green: 0.0
				blue: 0.392138).
	ColorTable at: 175
		put: (ColorValue 
				red: 0.188133
				green: 0.188133
				blue: 0.384202).
	ColorTable at: 176
		put: (ColorValue 
				red: 0.0
				green: 0.00390673
				blue: 0.19204).
	ColorTable at: 177 put: (ColorValue brightness: 0.188133).
	ColorTable at: 178
		put: (ColorValue 
				red: 0.0
				green: 0.00390673
				blue: 0.19204).
	ColorTable at: 179
		put: (ColorValue 
				red: 0.0
				green: 0.00390673
				blue: 0.19204).
	ColorTable at: 180
		put: (ColorValue 
				red: 0.199976
				green: 0.0
				blue: 1.0).
	ColorTable at: 181
		put: (ColorValue 
				red: 0.611647
				green: 0.396044
				blue: 1.0).
	ColorTable at: 182
		put: (ColorValue 
				red: 0.19204
				green: 0.0
				blue: 0.611647).
	ColorTable at: 183
		put: (ColorValue 
				red: 0.396044
				green: 0.392138
				blue: 0.615676).
	ColorTable at: 184
		put: (ColorValue 
				red: 0.188133
				green: 0.0
				blue: 0.388231).
	ColorTable at: 185
		put: (ColorValue 
				red: 0.384202
				green: 0.188133
				blue: 0.388231).
	ColorTable at: 186
		put: (ColorValue 
				red: 0.0
				green: 0.00390673
				blue: 0.19204).
	ColorTable at: 187 put: (ColorValue brightness: 0.188133).
	ColorTable at: 188
		put: (ColorValue 
				red: 0.0
				green: 0.00390673
				blue: 0.19204).
	ColorTable at: 189
		put: (ColorValue 
				red: 0.0
				green: 0.00390673
				blue: 0.19204).
	ColorTable at: 190
		put: (ColorValue 
				red: 0.392138
				green: 0.0
				blue: 1.0).
	ColorTable at: 191
		put: (ColorValue 
				red: 0.811745
				green: 0.392138
				blue: 1.0).
	ColorTable at: 192
		put: (ColorValue 
				red: 0.388231
				green: 0.0
				blue: 0.60774).
	ColorTable at: 193
		put: (ColorValue 
				red: 0.396044
				green: 0.392138
				blue: 0.615676).
	ColorTable at: 194
		put: (ColorValue 
				red: 0.188133
				green: 0.0
				blue: 0.388231).
	ColorTable at: 195
		put: (ColorValue 
				red: 0.384202
				green: 0.188133
				blue: 0.388231).
	ColorTable at: 196
		put: (ColorValue 
				red: 0.19204
				green: 0.0
				blue: 0.188133).
	ColorTable at: 197 put: (ColorValue brightness: 0.188133).
	ColorTable at: 198
		put: (ColorValue 
				red: 0.0
				green: 0.00390673
				blue: 0.19204).
	ColorTable at: 199
		put: (ColorValue 
				red: 0.19204
				green: 0.0
				blue: 0.188133)</body>

<body package="CADSM-UI-DXF" selector="initColorTable255">initColorTable255
	ColorTable at: 200
		put: (ColorValue 
				red: 0.807838
				green: 0.0
				blue: 1.0).
	ColorTable at: 201
		put: (ColorValue 
				red: 0.811745
				green: 0.392138
				blue: 1.0).
	ColorTable at: 202
		put: (ColorValue 
				red: 0.388231
				green: 0.0
				blue: 0.60774).
	ColorTable at: 203
		put: (ColorValue 
				red: 0.611647
				green: 0.396044
				blue: 0.611647).
	ColorTable at: 204
		put: (ColorValue 
				red: 0.384202
				green: 0.0
				blue: 0.388231).
	ColorTable at: 205
		put: (ColorValue 
				red: 0.384202
				green: 0.188133
				blue: 0.388231).
	ColorTable at: 206
		put: (ColorValue 
				red: 0.19204
				green: 0.0
				blue: 0.188133).
	ColorTable at: 207 put: (ColorValue brightness: 0.188133).
	ColorTable at: 208
		put: (ColorValue 
				red: 0.19204
				green: 0.0
				blue: 0.188133).
	ColorTable at: 209
		put: (ColorValue 
				red: 0.188133
				green: 0.00390673
				blue: 0.18032).
	ColorTable at: 210
		put: (ColorValue 
				red: 1.0
				green: 0.0
				blue: 0.995971).
	ColorTable at: 211
		put: (ColorValue 
				red: 1.0
				green: 0.399951
				blue: 1.0).
	ColorTable at: 212
		put: (ColorValue 
				red: 0.60774
				green: 0.0
				blue: 0.611647).
	ColorTable at: 213
		put: (ColorValue 
				red: 0.611647
				green: 0.396044
				blue: 0.611647).
	ColorTable at: 214
		put: (ColorValue 
				red: 0.396044
				green: 0.0
				blue: 0.388231).
	ColorTable at: 215
		put: (ColorValue 
				red: 0.384202
				green: 0.188133
				blue: 0.388231).
	ColorTable at: 216
		put: (ColorValue 
				red: 0.19204
				green: 0.0
				blue: 0.188133).
	ColorTable at: 217 put: (ColorValue brightness: 0.188133).
	ColorTable at: 218
		put: (ColorValue 
				red: 0.19204
				green: 0.0
				blue: 0.188133).
	ColorTable at: 219
		put: (ColorValue 
				red: 0.19204
				green: 0.0
				blue: 0.188133).
	ColorTable at: 220
		put: (ColorValue 
				red: 1.0
				green: 0.0
				blue: 0.807838).
	ColorTable at: 221
		put: (ColorValue 
				red: 0.995971
				green: 0.396044
				blue: 0.811745).
	ColorTable at: 222
		put: (ColorValue 
				red: 0.611647
				green: 0.0
				blue: 0.388231).
	ColorTable at: 223
		put: (ColorValue 
				red: 0.611647
				green: 0.396044
				blue: 0.611647).
	ColorTable at: 224
		put: (ColorValue 
				red: 0.384202
				green: 0.0
				blue: 0.388231).
	ColorTable at: 225
		put: (ColorValue 
				red: 0.384202
				green: 0.188133
				blue: 0.388231).
	ColorTable at: 226
		put: (ColorValue 
				red: 0.19204
				green: 0.0
				blue: 0.188133).
	ColorTable at: 227 put: (ColorValue brightness: 0.188133).
	ColorTable at: 228
		put: (ColorValue 
				red: 0.19204
				green: 0.0
				blue: 0.188133).
	ColorTable at: 229
		put: (ColorValue 
				red: 0.19204
				green: 0.0
				blue: 0.188133).
	ColorTable at: 230
		put: (ColorValue 
				red: 1.0
				green: 0.00390673
				blue: 0.388231).
	ColorTable at: 231
		put: (ColorValue 
				red: 0.995971
				green: 0.396044
				blue: 0.811745).
	ColorTable at: 232
		put: (ColorValue 
				red: 0.611647
				green: 0.0
				blue: 0.388231).
	ColorTable at: 233
		put: (ColorValue 
				red: 0.611647
				green: 0.392138
				blue: 0.388231).
	ColorTable at: 234
		put: (ColorValue 
				red: 0.388231
				green: 0.0
				blue: 0.19204).
	ColorTable at: 235
		put: (ColorValue 
				red: 0.384202
				green: 0.188133
				blue: 0.388231).
	ColorTable at: 236
		put: (ColorValue 
				red: 0.19204
				green: 0.0
				blue: 0.188133).
	ColorTable at: 237 put: (ColorValue brightness: 0.188133).
	ColorTable at: 238
		put: (ColorValue 
				red: 0.19204
				green: 0.00390673
				blue: 0.00390673).
	ColorTable at: 239
		put: (ColorValue 
				red: 0.19204
				green: 0.0
				blue: 0.188133).
	ColorTable at: 240
		put: (ColorValue 
				red: 1.0
				green: 0.0
				blue: 0.188133).
	ColorTable at: 241
		put: (ColorValue 
				red: 1.0
				green: 0.392138
				blue: 0.615676).
	ColorTable at: 242
		put: (ColorValue 
				red: 0.611647
				green: 0.0
				blue: 0.188133).
	ColorTable at: 243
		put: (ColorValue 
				red: 0.611647
				green: 0.392138
				blue: 0.388231).
	ColorTable at: 244
		put: (ColorValue 
				red: 0.388231
				green: 0.0
				blue: 0.19204).
	ColorTable at: 245
		put: (ColorValue 
				red: 0.388231
				green: 0.188133
				blue: 0.396044).
	ColorTable at: 246
		put: (ColorValue 
				red: 0.19204
				green: 0.00390673
				blue: 0.00390673).
	ColorTable at: 247 put: (ColorValue brightness: 0.188133).
	ColorTable at: 248
		put: (ColorValue 
				red: 0.19204
				green: 0.00390673
				blue: 0.00390673).
	ColorTable at: 249
		put: (ColorValue 
				red: 0.19204
				green: 0.00390673
				blue: 0.00390673).
	ColorTable at: 250 put: ColorValue black.
	ColorTable at: 251 put: (ColorValue brightness: 0.156757).
	ColorTable at: 252
		put: (ColorValue 
				red: 0.356855
				green: 0.364669
				blue: 0.352826).
	ColorTable at: 253
		put: (ColorValue 
				red: 0.517641
				green: 0.525455
				blue: 0.513612).
	ColorTable at: 254
		put: (ColorValue 
				red: 0.737151
				green: 0.729337
				blue: 0.741057).
	ColorTable at: 255 put: (ColorValue brightness: 0.682334)</body>

<body package="CADSM-UI-DXF" selector="initColorTable50">initColorTable50
	ColorTable := Array new: 255.
	ColorTable at: 1 put: ColorValue red.
	ColorTable at: 2 put: ColorValue yellow.
	ColorTable at: 3 put: ColorValue green.
	ColorTable at: 4 put: ColorValue cyan.
	ColorTable at: 5 put: ColorValue blue.
	ColorTable at: 6 put: ColorValue magenta.
	ColorTable at: 7 put: ColorValue black.
	ColorTable at: 8
		put: (ColorValue 
				red: 0.517641
				green: 0.525455
				blue: 0.513612).
	ColorTable at: 9
		put: (ColorValue 
				red: 0.737151
				green: 0.729337
				blue: 0.741057).
	ColorTable at: 10
		put: (ColorValue 
				red: 0.995971
				green: 0.0
				blue: 0.0).
	ColorTable at: 11
		put: (ColorValue 
				red: 1.0
				green: 0.396044
				blue: 0.388231).
	ColorTable at: 12
		put: (ColorValue 
				red: 0.611647
				green: 0.0
				blue: 0.00390673).
	ColorTable at: 13
		put: (ColorValue 
				red: 0.611647
				green: 0.392138
				blue: 0.388231).
	ColorTable at: 14
		put: (ColorValue 
				red: 0.392138
				green: 0.0
				blue: 0.0).
	ColorTable at: 15
		put: (ColorValue 
				red: 0.384202
				green: 0.188133
				blue: 0.19204).
	ColorTable at: 16
		put: (ColorValue 
				red: 0.19204
				green: 0.00390673
				blue: 0.00390673).
	ColorTable at: 17 put: (ColorValue brightness: 0.188133).
	ColorTable at: 18
		put: (ColorValue 
				red: 0.19204
				green: 0.00390673
				blue: 0.00390673).
	ColorTable at: 19
		put: (ColorValue 
				red: 0.19204
				green: 0.00390673
				blue: 0.00390673).
	ColorTable at: 20
		put: (ColorValue 
				red: 0.995971
				green: 0.188133
				blue: 0.00390673).
	ColorTable at: 21
		put: (ColorValue 
				red: 1.0
				green: 0.603833
				blue: 0.384202).
	ColorTable at: 22
		put: (ColorValue 
				red: 0.619582
				green: 0.184227
				blue: 0.00390673).
	ColorTable at: 23
		put: (ColorValue 
				red: 0.611647
				green: 0.392138
				blue: 0.388231).
	ColorTable at: 24
		put: (ColorValue 
				red: 0.388231
				green: 0.19204
				blue: 0.0).
	ColorTable at: 25
		put: (ColorValue 
				red: 0.384202
				green: 0.396044
				blue: 0.188133).
	ColorTable at: 26
		put: (ColorValue 
				red: 0.19204
				green: 0.00390673
				blue: 0.00390673).
	ColorTable at: 27 put: (ColorValue brightness: 0.188133).
	ColorTable at: 28
		put: (ColorValue 
				red: 0.19204
				green: 0.00390673
				blue: 0.00390673).
	ColorTable at: 29
		put: (ColorValue 
				red: 0.19204
				green: 0.00390673
				blue: 0.00390673).
	ColorTable at: 30
		put: (ColorValue 
				red: 1.0
				green: 0.396044
				blue: 0.00390673).
	ColorTable at: 31
		put: (ColorValue 
				red: 1.0
				green: 0.811745
				blue: 0.388231).
	ColorTable at: 32
		put: (ColorValue 
				red: 0.611647
				green: 0.396044
				blue: 0.0).
	ColorTable at: 33
		put: (ColorValue 
				red: 0.611647
				green: 0.392138
				blue: 0.388231).
	ColorTable at: 34
		put: (ColorValue 
				red: 0.388231
				green: 0.19204
				blue: 0.0).
	ColorTable at: 35
		put: (ColorValue 
				red: 0.384202
				green: 0.396044
				blue: 0.188133).
	ColorTable at: 36
		put: (ColorValue 
				red: 0.196069
				green: 0.188133
				blue: 0.0).
	ColorTable at: 37 put: (ColorValue brightness: 0.188133).
	ColorTable at: 38
		put: (ColorValue 
				red: 0.19204
				green: 0.00390673
				blue: 0.00390673).
	ColorTable at: 39
		put: (ColorValue 
				red: 0.196069
				green: 0.188133
				blue: 0.0).
	ColorTable at: 40
		put: (ColorValue 
				red: 1.0
				green: 0.811745
				blue: 0.0).
	ColorTable at: 41
		put: (ColorValue 
				red: 1.0
				green: 0.811745
				blue: 0.388231).
	ColorTable at: 42
		put: (ColorValue 
				red: 0.611647
				green: 0.396044
				blue: 0.0).
	ColorTable at: 43
		put: (ColorValue 
				red: 0.60774
				green: 0.603833
				blue: 0.384202).
	ColorTable at: 44
		put: (ColorValue 
				red: 0.388231
				green: 0.396044
				blue: 0.00781345).
	ColorTable at: 45
		put: (ColorValue 
				red: 0.384202
				green: 0.396044
				blue: 0.188133).
	ColorTable at: 46
		put: (ColorValue 
				red: 0.196069
				green: 0.188133
				blue: 0.0).
	ColorTable at: 47 put: (ColorValue brightness: 0.188133).
	ColorTable at: 48
		put: (ColorValue 
				red: 0.196069
				green: 0.188133
				blue: 0.0).
	ColorTable at: 49
		put: (ColorValue 
				red: 0.196069
				green: 0.188133
				blue: 0.0)</body>
</methods>

<methods>
<class-id>CADSM.UI.DXF.DXFBLOCK</class-id> <category>transforming</category>

<body package="CADSM-UI-DXF" selector="scaledBy:">scaledBy: aFullColumn 
	graphics do: [:aGraphic | aGraphic scaledBy: aFullColumn]</body>
</methods>

<methods>
<class-id>CADSM.UI.DXF.DXFBLOCK</class-id> <category>accessing</category>

<body package="CADSM-UI-DXF" selector="aBoundingBox">aBoundingBox
	^self triggerEvent: #getBoundingBox</body>

<body package="CADSM-UI-DXF" selector="aBoundingBox:">aBoundingBox: aBoundingBox 
	self removeActionsForEvent: #getBoundingBox.
	aBoundingBox ifNotNil: 
			[self 
				when: #getBoundingBox
				ask: aBoundingBox
				perform: #yourself]</body>

<body package="CADSM-UI-DXF" selector="aDisplayList">aDisplayList
	^self triggerEvent: #getDisplayList</body>

<body package="CADSM-UI-DXF" selector="aDisplayList:">aDisplayList: aDisplayList 
	self removeActionsForEvent: #getDisplayList.
	aDisplayList ifNotNil:
			[self 
				when: #getDisplayList
				ask: aDisplayList
				perform: #yourself]</body>

<body package="CADSM-UI-DXF" selector="center">center
	^self aBoundingBox center</body>

<body package="CADSM-UI-DXF" selector="removeDisplayList">removeDisplayList
	self aDisplayList ifNotNil: 
			[:listID | 
			self interface display aOpenGLContext removeDisplayList: listID.
			self aDisplayList: nil]</body>

<body package="CADSM-UI-DXF" selector="removeSup">removeSup
	self removeDisplayList.
	self aSup ifNotNil: [:aaSup | aaSup removeDXFBLOCK: self]</body>
</methods>

<methods>
<class-id>CADSM.UI.DXF.DXFBLOCK</class-id> <category>calc</category>

<body package="CADSM-UI-DXF" selector="calcBoundingBox">calcBoundingBox
	| aBoundingBox aBox |
	aBoundingBox := graphics isEmpty 
				ifTrue: [CADSM.Misc.CADSMMiscBoundingBox new]
				ifFalse: 
					[aBox := CADSM.Misc.CADSMMiscBoundingBox new.
					graphics inject: aBox
						into: [:bbox :graphic | bbox expandToBound: graphic aBoundingBoxF].
					aBox].
	self aBoundingBox: aBoundingBox</body>
</methods>

<methods>
<class-id>CADSM.UI.DXF.DXFBLOCK</class-id> <category>copying</category>

<body package="CADSM-UI-DXF" selector="postCopy">postCopy
	| aBoundingBox |
	aBoundingBox := self aBoundingBox.
	super postCopy.
	self aBoundingBox: aBoundingBox copy</body>
</methods>

<methods>
<class-id>CADSM.UI.DXF.DXFBLOCK</class-id> <category>rendering</category>

<body package="CADSM-UI-DXF" selector="renderOn:">renderOn: aOpenGLContext 
	container isPart 
		ifTrue: 
			[| block |
			block := 
					[| listID |
					listID := aOpenGLContext createDisplayList: 
									[aOpenGLContext pushTransformation: refFrame aMFf
										while: [graphics do: [:graphic | graphic renderOn: aOpenGLContext]]]
								displayImmediately: false.
					self aDisplayList: listID.
					aOpenGLContext callDisplayList: listID].
			self aDisplayList ifNil: block
				ifNotNil: 
					[:listID | 
					(aOpenGLContext isDisplayList: listID) 
						ifTrue: [aOpenGLContext callDisplayList: listID]
						ifFalse: block]]
		ifFalse: 
			[aOpenGLContext pushTransformation: refFrame aMFf
				while: [graphics do: [:graphic | graphic renderOn: aOpenGLContext]]]</body>
</methods>

<methods>
<class-id>CADSM.UI.DXF.DXFBLOCK</class-id> <category>initialize-release</category>

<body package="CADSM-UI-DXF" selector="preSave">preSave
	super preSave.
	self removeDisplayList</body>

<body package="CADSM-UI-DXF" selector="release">release
	self removeDisplayList.
	super release</body>
</methods>

<methods>
<class-id>CADSM.UI.DXF.DXFBLOCK class</class-id> <category>triggering events</category>

<body package="CADSM-UI-DXF" selector="constructEventsTriggered">constructEventsTriggered
	^(super constructEventsTriggered)
		add: #getDisplayList;
		yourself</body>
</methods>

<do-it>"Imported Classes:"</do-it>

<do-it>self error: 'Attempting to file-in parcel imports.  Choose terminate or close'</do-it>

<class>
<name>GEOSketch</name>
<environment>StCAD.StGeo</environment>
<super>StCAD.StGeo.GEOAnyGraphic</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>graphics </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>GEO</category>
<attributes>
<package>xGeo</package>
</attributes>
</class>

<class>
<name>JunDXFScanner</name>
<environment>Jun</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>source mark groupCode dataKey dataString dataNumber failBlock debug lineSeparator lines </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>Jun-DXF-Support</category>
<attributes>
<package>Jun-DXF-Support</package>
</attributes>
</class>

</st-source>
