<?xml version="1.0"?>

<st-source>
<!-- 
Name: CADSM-NMT
HideSource: false
PackageName: CADSM-NMT
Parcel: #('cadsmnmt')
PrerequisiteParcels: #(#('CADSM-Basic' ''))
SaveSource: true
Version: 2
Date: 12:58:58 pm October 19, 2009
 -->
<time-stamp>From VisualWorks®, 7.5 of April 16, 2007 on October 19, 2009 at 12:58:58 pm</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>CADSMGeoSketch</name>
<environment>CADSM.NMT</environment>
<super>CADSM.Geo.CADSMGeoPlane</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>cGraphic cSurface </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTItem</name>
<environment>CADSM.NMT</environment>
<super>CADSMItem</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTSubItem</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTItem</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>cEventHandler aSup </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<comment>
<class-id>CADSM.NMT.CADSMNMTSubItem</class-id>
<body>NMTItem are Non Manifold Topology structures for Geometric Modeling based on Kevin Weiler's dissertation. Each part will have one NMT model.

</body>
</comment>

<class>
<name>CADSMNMTAnyNMT</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTSubItem</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTAnyFeature</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTSubItem</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTFeatureOrder</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTAnyFeature</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>cFeature </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTFeature</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTAnyFeature</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTChamferFeature</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTFeature</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTFilletFeature</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTFeature</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTItemUse</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTAnyNMT</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>aNMTItem </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTPairedUse</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTItemUse</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>mate </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTFaceUse</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTPairedUse</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>cLoopUse aSurface isSameSense mark </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTShellUse</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTItemUse</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>cItemUse </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTVertexShellUse</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTShellUse</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTConcreteNMT</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTAnyNMT</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTModel</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTConcreteNMT</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>cFeature cRegion cShell cFace cLoop cEdge cVertex aRefFrame aBoundingBox </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<comment>
<class-id>CADSM.NMT.CADSMNMTModel</class-id>
<body>Model creates and stores all nonUse NMTItem.

Subclasses must implement the following messages:
	calc
		cItemWithBoundingBox

Instance Variables:
	aBoundingBox	&lt;Object&gt;	description of aBoundingBox
	cEdge	&lt;Collection&gt;	Stores all Edge.
	cFace	&lt;Collection&gt;	Stores all Face
	cFeature	&lt;Collection&gt;	Stores all Feature
	cLoop	&lt;Collection&gt;	Stores all Loop
	cRegion	&lt;Collection&gt;	description of cRegion
	cShell	&lt;Collection&gt;	Stores all Shell
	cVertex	&lt;Collection&gt;	Stores all Vertex

</body>
</comment>

<class>
<name>CADSMNMTManyUseItem</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTConcreteNMT</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>cUse </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTFace</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTManyUseItem</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>aSurface </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<comment>
<class-id>CADSM.NMT.CADSMNMTFace</class-id>
<body>The outward normal is positive. Use the Right Hand Rule to determine loop orientation. CCW loop means the normal is pointing towards observer. CW loop means a hole.
In NMT the faceuse normal points into the region containing it. The outward normal points into the infinite outside region.

For non manifold face chose the positive side to have normal_z &gt; 0. 
If normal_z = 0, choose normal_y &gt; 0. 
If normal_z = normal_y = 0, choose normal_x &gt; 0.

Instance Variables:
	aSurface	&lt;Object&gt;	xyz as function of uv.
	cFaceUse	&lt;Object&gt;	description of cFaceUse

</body>
</comment>

<class>
<name>CADSMNMTEdge</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTManyUseItem</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>aCurve </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<comment>
<class-id>CADSM.NMT.CADSMNMTEdge</class-id>
<body>When edge is not on a surface aCurve is defined as xyz as function of u.
When edge is on a surface aCurve is not used. The edgeuse stores the geometric information.

Instance Variables:
	aCurve	&lt;Object&gt;	description of aCurve

</body>
</comment>

<class>
<name>CADSMNMTRegion</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTConcreteNMT</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>cShellUse </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTLoop</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTManyUseItem</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTOutsideRegion</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTRegion</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<comment>
<class-id>CADSM.NMT.CADSMNMTOutsideRegion</class-id>
<body>This represent the infinite region containing all subelements of the model. It is created immediately with the model.

</body>
</comment>

<class>
<name>CADSMNMTAnyOperator</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTItem</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTGeometricOperator</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTAnyOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTReplaceSurface</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTGeometricOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTGlobalOperator</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTAnyOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTMove</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTGlobalOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTRotate</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTGlobalOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTMirror</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTGlobalOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTSetOperator</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTAnyOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTOR</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTSetOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTNegate</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTGlobalOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTCompositeOperator</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTAnyOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>cOperator </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTMakePrism</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTCompositeOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>aSketchFaceUse zStart zEnd newModel aOutsideRegion newTopFace newBottomFace cNewSideFace </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTMakeThinSolid1</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTCompositeOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>cPoint newModel newTopFace newBottomFace </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTMakeThinSolid</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTCompositeOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>aSketchFaceUse newModel newTopFace newBottomFace </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTMakeFlatFace</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTCompositeOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTMakePrism1</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTCompositeOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>cTopPoint cBottomPoint newModel </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTMakeLoft</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTCompositeOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>aRegion aFace cTopPoint cNewSideFace </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTAND</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTSetOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTCopy</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTGlobalOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTEulerOperator</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTAnyOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTGlueR</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTEulerOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTMakeFU</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTEulerOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>cEdgeUse newFaceUse aSurface </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTKillF</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTEulerOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTGlueE</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTEulerOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTGlueEKillE</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTGlueE</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTKillE</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTEulerOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>aEdge </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTGlueEKillSEV</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTGlueE</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTGlueF</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTEulerOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTKillM</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTEulerOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTGlueFKillFLEV</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTGlueF</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTKillEMakeL</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTKillE</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>aLoop newLoop </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTSplitE</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTEulerOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTKillEMakeS</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTKillE</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTGlueEKillEV</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTGlueE</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTKillFL</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTKillF</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTGlueEKillFLE</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTGlueE</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTKillV</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTEulerOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTKillVSFLE</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTKillV</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTKillVE</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTKillV</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTKillVS</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTKillV</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTKillVRSFL</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTKillV</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTMakeMR</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTEulerOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTKillVFLE</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTKillV</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTKillEFLMakeS</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTKillE</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTMakeSV</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTEulerOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>aRegion aPoint newShell newVertex </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTKillVL</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTKillV</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTManifoldMake</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTEulerOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTMMakeEV</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTManifoldMake</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>aRegion aFace aEdge aVertex aPoint orient newEdge aCurve newVertex </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTMMakeE</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTManifoldMake</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>aRegion aFace aEdge1 aVertex1 orient1 aEdge2 aVertex2 orient2 aCurve newEdge </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTMMakeEFL</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTMMakeE</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>newLoop newFace </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTMMakeEKillL</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTMMakeE</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>killedLoop </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTMakeE</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTEulerOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>aRegion aVertex1 aVertex2 aCurve newEdge </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTMakeEKillS</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTMakeE</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTKillFLMakeS</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTKillF</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTMakeF</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTEulerOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>aRegion cEdge newLoop newFace newShell newRegion </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTMakeFL</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTMakeF</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTMakeFLRS</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTMakeF</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTMakeRSFL</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTEulerOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>aRegion aVertex newRegion newShell newFace newLoop </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTGlueFKillSFLEV</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTGlueF</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTKillEFL</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTKillE</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTReplacePoint</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTGeometricOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTSketchedFeature</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTFeature</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>aSketch aModel </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTExtrudedFeature</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTSketchedFeature</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>zStart zEnd </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTCutFeature</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTExtrudedFeature</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTRevolvedFeature</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTSketchedFeature</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>angStart angEnd </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTLoopUse</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTPairedUse</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>cItemUse </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTVertexLoopUse</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTLoopUse</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTGlueV</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTEulerOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTGlueVKillSV</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTGlueV</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTGlueVKillV</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTGlueV</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTGlueVKillEV</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTGlueV</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTVertexUse</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTItemUse</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>aPoint </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<comment>
<class-id>CADSM.NMT.CADSMNMTVertexUse</class-id>
<body>aVertexUse can be contained by aShell, aLoopUse, aEdgeUse.
In aShell, tORuORuvORxyz is not used. The xyz coordinates is stored in aVertexUse corresponding vertex.
In aLoopUse, tORuORuvORxyz stores the u0v0 such that the vertex is positioned at xyz(u0v0) on the face.
In aEdgeUse which is a wireframe, tORuORuvORxyz stores the u0 such that the vertex is positioned at xyz(u0) on the edge.
In aEdgeUse which is on a face, tORuORuvORxyz stores the t0 such that the vertex is positioned at xyz(uv(t0)) on the face.

Instance Variables:
	tORuORuvORxyz	&lt;Object&gt;	description of tORuORuvORxyz

</body>
</comment>

<class>
<name>CADSMNMTShellVertexUse</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTVertexUse</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTEdgeVertexUse</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTVertexUse</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTLoopVertexUse</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTVertexUse</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTDIFF</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTSetOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTShell</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTManyUseItem</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTMakeEV</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTEulerOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>aRegion aVertex aPoint aCurve newEdge newVertex </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTKillFLRS</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTKillF</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTReplaceCurve</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTGeometricOperator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Operator</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTVertex</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTManyUseItem</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>aPoint </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTFeatureDecorator</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTAnyFeature</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>aFeature </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTNotDoneFeature</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTFeatureDecorator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTDormantFeature</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTFeatureDecorator</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTEdgeUse</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTPairedUse</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>aVertexUse radial aCurve isSameSense </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<comment>
<class-id>CADSM.NMT.CADSMNMTEdgeUse</class-id>
<body>When edgeuse in not on a face its geometry is stored in the edge element.
When edgeuse is on a face it stored the curve as xyz function of uv function of t. xyx(uv(t)).

Instance Variables:
	aVertexUse	&lt;EdgeUse | VertexUse&gt;	description of aVertexUse
	orientation	&lt;ArithmeticValue | EdgeUse | FaceUse | JunAngle | JunPenAngle | JunPenLocation | JunPoint | StMArray | StMSparseVector | StMSymbolic&gt;	description of orientation
	radial	&lt;Object&gt;	description of radial
	uvOFtORxyzOFu	&lt;Object&gt;	stores uv(t) to be used with the face xyz(uv) to get xyz(uv(t)). Or xyz(u).

</body>
</comment>

<class>
<name>CADSMNMTFaceEdgeUse</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTEdgeUse</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<class>
<name>CADSMNMTWireEdgeUse</name>
<environment>CADSM.NMT</environment>
<super>CADSM.NMT.CADSMNMTEdgeUse</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-NMT-Basic</category>
<attributes>
<package>CADSM-NMT</package>
</attributes>
</class>

<methods>
<class-id>CADSM.NMT.CADSMGeoSketch</class-id> <category>initialize-release</category>

<body package="CADSM-NMT" selector="initialize">initialize
	super initialize.
	cGraphic := CADSM.Misc.CADSMMiscOrderedSet new.
	cSurface := CADSM.Misc.CADSMMiscOrderedSet new</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMGeoSketch</class-id> <category>calc</category>

<body package="CADSM-NMT" selector="cItemWithBoundingBox">cItemWithBoundingBox
	^cGraphic ifNil: [OrderedCollection new]
		ifNotNil: 
			[(OrderedCollection new: cGraphic size)
				addAll: cGraphic;
				yourself]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMGeoSketch</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="addGraphic:">addGraphic: aGraphic 
	"aSub maybe already in a tree. Make sure aSub is released by its aSup."

	aGraphic removeSup.
	super addRefFrame: aGraphic aRefFrame.
	cGraphic add: aGraphic.
	aGraphic aSup: self.
	self calcBoundingBox.
	^aGraphic</body>

<body package="CADSM-NMT" selector="addGraphics:">addGraphics: array 
	array do: [:graphic | self addGraphic: graphic]</body>

<body package="CADSM-NMT" selector="addSurface:">addSurface: aSurface 
	"aSub maybe already in a tree. Make sure aSub is released by its aSup."

	aSurface removeSup.
	super addRefFrame: aSurface aRefFrame.
	cSurface add: aSurface.
	aSurface aSup: self.
	^aSurface</body>

<body package="CADSM-NMT" selector="aLoopUse">aLoopUse
	| aLoop aLoopUse |
	aLoop := CADSM.NMT.CADSMNMTLoop new.
	aLoopUse := aLoop newUse.
	self cEdgeUse do: [:aEdgeUse | aLoopUse addEdgeUse: aEdgeUse].
	^aLoopUse</body>

<body package="CADSM-NMT" selector="aRectSurface">aRectSurface
	self privateCalcBoundingBox.
	aRectSurface aBoundingBox: aBoundingBox.
	^aRectSurface</body>

<body package="CADSM-NMT" selector="aSketch">aSketch
	^self</body>

<body package="CADSM-NMT" selector="aSketchFaceUse">aSketchFaceUse
	"
	This faceuse does not belong to the part model.
	It is just convenient to use it to pass information to the operators to create the part model.
	"

	| aFace aFaceUse |
	aFace := CADSM.NMT.CADSMNMTFace new.
	aFaceUse := aFace newUse.
	aFaceUse aSurface: self aRectSurface.
	aFaceUse isSameSense: true.
	self cLoopUse do: [:aLoopUse | aFaceUse addLoopUse: aLoopUse].
	^aFaceUse</body>

<body package="CADSM-NMT" selector="aSketchRefFrame">aSketchRefFrame
	^aRefFrame</body>

<body package="CADSM-NMT" selector="asPolylines">asPolylines
	^cGraphic collect: [:aGraphic | aGraphic asPolyline]</body>

<body package="CADSM-NMT" selector="cEdgeUse">cEdgeUse
	| cEdgeUse |
	cEdgeUse := CADSM.Misc.CADSMMiscOrderedSet new: 10.
	cGraphic do: [:aGraphic | cEdgeUse addAll: aGraphic cEdgeUse].
	^cEdgeUse</body>

<body package="CADSM-NMT" selector="cLoopUse">cLoopUse
	"Do for single loop for now. Extend to multiple loops later."

	| cLoopUse |
	cLoopUse := CADSM.Misc.CADSMMiscOrderedSet new: 3.
	cLoopUse add: self aLoopUse.
	^cLoopUse</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTSubItem</class-id> <category>private event table</category>

<body package="CADSM-NMT" selector="myEventTable">myEventTable
	^cEventHandler</body>

<body package="CADSM-NMT" selector="myEventTable:">myEventTable: anEventTable 
	cEventHandler := anEventTable</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTSubItem</class-id> <category>change</category>

<body package="CADSM-NMT" selector="changed">changed
	self triggerEvent: #changed</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTSubItem</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aMbDUnits">aMbDUnits
	^aSup ifNotNil: [aSup aMbDUnits]</body>

<body package="CADSM-NMT" selector="aMediator">aMediator
	^aSup ifNotNil: [aSup aMediator]</body>

<body package="CADSM-NMT" selector="asTreeNode">asTreeNode
	| answer |
	answer := CADSM.UI.CADSMUITreeNode new.
	answer geoItem: self.
	answer displayString: self name.
	^answer</body>

<body package="CADSM-NMT" selector="aSup">aSup
	^aSup</body>

<body package="CADSM-NMT" selector="aSup:">aSup: anObject
	aSup := anObject</body>

<body package="CADSM-NMT" selector="cDiscontinuity:">cDiscontinuity: cDiscontinuity 
	self removeActionsForEvent: #cDiscontinuity.
	cDiscontinuity notNil 
		ifTrue: 
			[self 
				when: #cDiscontinuity
				ask: cDiscontinuity
				perform: #yourself]</body>

<body package="CADSM-NMT" selector="dataSeries">dataSeries
	| answer |
	answer := self triggerEvent: #getDataSeries.
	answer isNil 
		ifTrue: 
			[answer := OrderedCollection new.
			self dataSeries: answer].
	^answer</body>

<body package="CADSM-NMT" selector="dataSeries:">dataSeries: dataSeries 
	self removeActionsForEvent: #getDataSeries.
	dataSeries notNil ifTrue: [self
			when: #getDataSeries
			ask: dataSeries
			perform: #yourself]</body>

<body package="CADSM-NMT" selector="deleteMbD">deleteMbD
	self mbdObject: nil</body>

<body package="CADSM-NMT" selector="discontinuities:">discontinuities: discontinuities 
	self cDiscontinuity: discontinuities</body>

<body package="CADSM-NMT" selector="fullName">fullName
	| stream |
	stream := WriteStream on: (String new: 256).
	self fullpath do: [:node | (node respondsTo: #name)
			ifTrue: [node name isString
					ifTrue: 
						[stream nextPut: $/.
						stream nextPutAll: node name]]].
	^stream contents asSymbol</body>

<body package="CADSM-NMT" selector="fullpath">fullpath
	| fullpath |
	fullpath := aSup isNil 
				ifTrue: [OrderedCollection new]
				ifFalse: [aSup fullpath].
	fullpath add: self.
	^fullpath</body>

<body package="CADSM-NMT" selector="geoTime">geoTime
	^aSup ifNotNil: [aSup geoTime]</body>

<body package="CADSM-NMT" selector="interface">interface
	^self aMediator</body>

<body package="CADSM-NMT" selector="mbdClass">mbdClass
	^self class mbdClass</body>

<body package="CADSM-NMT" selector="mbdObject:">mbdObject: mbdObject 
	self removeActionsForEvent: #mbdObject.
	mbdObject ifNotNil: 
			[self 
				when: #mbdObject
				ask: mbdObject
				perform: #yourself]</body>

<body package="CADSM-NMT" selector="notes:">notes: notes 
	self removeActionsForEvent: #getNotes.
	notes notNil 
		ifTrue: 
			[self 
				when: #getNotes
				ask: notes
				perform: #yourself]</body>

<body package="CADSM-NMT" selector="removeSup">removeSup
	aSup ifNotNil: [:aaSup | aaSup removeSub: self]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTSubItem</class-id> <category>testing</category>

<body package="CADSM-NMT" selector="isAssembly">isAssembly
	^false</body>

<body package="CADSM-NMT" selector="isJoint">isJoint
	^false</body>

<body package="CADSM-NMT" selector="isMotion">isMotion
	^false</body>

<body package="CADSM-NMT" selector="isUniverse">isUniverse
	^false</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTSubItem</class-id> <category>copying</category>

<body package="CADSM-NMT" selector="postCopy">postCopy
	super postCopy.
	cEventHandler := nil.
	aSup := nil</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTAnyNMT</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aColor">aColor
	^aSup aColor</body>

<body package="CADSM-NMT" selector="alpha">alpha
	^(self triggerEvent: #getalpha) ifNil: 
			[| answer |
			answer := 1.0d.
			self alpha: answer.
			answer]</body>

<body package="CADSM-NMT" selector="alpha:">alpha: alpha 
	self removeActionsForEvent: #getalpha.
	alpha ifNotNil: 
			[self 
				when: #getalpha
				ask: alpha
				perform: #yourself]</body>

<body package="CADSM-NMT" selector="aModel">aModel
	^aSup aModel</body>

<body package="CADSM-NMT" selector="aRegion">aRegion
	^aSup aRegion</body>

<body package="CADSM-NMT" selector="aShell">aShell
	^aSup aShell</body>

<body package="CADSM-NMT" selector="aShellUse">aShellUse
	^aSup aShellUse</body>

<body package="CADSM-NMT" selector="cSub">cSub
	self subclassResponsibility</body>

<body package="CADSM-NMT" selector="lineWidth">lineWidth
	^(self triggerEvent: #getlineWidth) ifNil: 
			[| answer |
			answer := 1.0d.
			self lineWidth: answer.
			answer]</body>

<body package="CADSM-NMT" selector="lineWidth:">lineWidth: lineWidth 
	self removeActionsForEvent: #getlineWidth.
	lineWidth ifNotNil: 
			[self 
				when: #getlineWidth
				ask: lineWidth
				perform: #yourself]</body>

<body package="CADSM-NMT" selector="paint">paint
	^(self triggerEvent: #getpaint) ifNil: 
			[| answer |
"			answer := ColorValue green copy."
			answer := ColorValue cyan copy.
			self paint: answer.
			answer]</body>

<body package="CADSM-NMT" selector="paint:">paint: paint 
	self removeActionsForEvent: #getpaint.
	paint ifNotNil: 
			[self 
				when: #getpaint
				ask: paint
				perform: #yourself]</body>

<body package="CADSM-NMT" selector="removeSub:">removeSub: aSub 
	^(self cSub remove: aSub ifAbsent: [nil]) ifNotNil: 
			[:aaSub | 
			aaSub aSup: nil.
			aaSub]</body>

<body package="CADSM-NMT" selector="stipplePattern">stipplePattern
	^self triggerEvent: #getstipplePattern</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTAnyNMT</class-id> <category>enumerating</category>

<body package="CADSM-NMT" selector="selectCurve:">selectCurve: aBlock 
	| aSet |
	aSet := CADSM.Misc.CADSMMiscOrderedSet new: 10.
	self selectCurve: aBlock into: aSet.
	^aSet</body>

<body package="CADSM-NMT" selector="selectEdge:">selectEdge: aBlock 
	| aSet |
	aSet := CADSM.Misc.CADSMMiscOrderedSet new: 10.
	self selectEdge: aBlock into: aSet.
	^aSet</body>

<body package="CADSM-NMT" selector="selectEdge:into:">selectEdge: aBlock into: aSet 
	self subclassResponsibility</body>

<body package="CADSM-NMT" selector="selectEdgeUse:">selectEdgeUse: aBlock 
	| aSet |
	aSet := CADSM.Misc.CADSMMiscOrderedSet new: 10.
	self selectEdgeUse: aBlock into: aSet.
	^aSet</body>

<body package="CADSM-NMT" selector="selectEdgeUse:into:">selectEdgeUse: aBlock into: aSet 
	self subclassResponsibility</body>

<body package="CADSM-NMT" selector="selectFace:">selectFace: aBlock 
	| aSet |
	aSet := CADSM.Misc.CADSMMiscOrderedSet new: 10.
	self selectFace: aBlock into: aSet.
	^aSet</body>

<body package="CADSM-NMT" selector="selectFace:into:">selectFace: aBlock into: aSet 
	self subclassResponsibility</body>

<body package="CADSM-NMT" selector="selectFaceUse:">selectFaceUse: aBlock 
	| aSet |
	aSet := CADSM.Misc.CADSMMiscOrderedSet new: 10.
	self selectFaceUse: aBlock into: aSet.
	^aSet</body>

<body package="CADSM-NMT" selector="selectFaceUse:into:">selectFaceUse: aBlock into: aSet 
	self subclassResponsibility</body>

<body package="CADSM-NMT" selector="selectLoop:">selectLoop: aBlock 
	| aSet |
	aSet := CADSM.Misc.CADSMMiscOrderedSet new: 10.
	self selectLoop: aBlock into: aSet.
	^aSet</body>

<body package="CADSM-NMT" selector="selectLoop:into:">selectLoop: aBlock into: aSet 
	self subclassResponsibility</body>

<body package="CADSM-NMT" selector="selectLoopUse:">selectLoopUse: aBlock 
	| aSet |
	aSet := CADSM.Misc.CADSMMiscOrderedSet new: 10.
	self selectLoopUse: aBlock into: aSet.
	^aSet</body>

<body package="CADSM-NMT" selector="selectLoopUse:into:">selectLoopUse: aBlock into: aSet 
	self subclassResponsibility</body>

<body package="CADSM-NMT" selector="selectModel:">selectModel: aBlock 
	| aSet |
	aSet := CADSM.Misc.CADSMMiscOrderedSet new: 10.
	self selectModel: aBlock into: aSet.
	^aSet</body>

<body package="CADSM-NMT" selector="selectRegion:">selectRegion: aBlock 
	| aSet |
	aSet := CADSM.Misc.CADSMMiscOrderedSet new: 10.
	self selectRegion: aBlock into: aSet.
	^aSet</body>

<body package="CADSM-NMT" selector="selectRegion:into:">selectRegion: aBlock into: aSet 
	self subclassResponsibility</body>

<body package="CADSM-NMT" selector="selectShell:">selectShell: aBlock 
	| aSet |
	aSet := CADSM.Misc.CADSMMiscOrderedSet new: 10.
	self selectShell: aBlock into: aSet.
	^aSet</body>

<body package="CADSM-NMT" selector="selectShell:into:">selectShell: aBlock into: aSet 
	self subclassResponsibility</body>

<body package="CADSM-NMT" selector="selectShellUse:">selectShellUse: aBlock 
	| aSet |
	aSet := CADSM.Misc.CADSMMiscOrderedSet new: 10.
	self selectShellUse: aBlock into: aSet.
	^aSet</body>

<body package="CADSM-NMT" selector="selectShellUse:into:">selectShellUse: aBlock into: aSet 
	self subclassResponsibility</body>

<body package="CADSM-NMT" selector="selectSurface:">selectSurface: aBlock 
	| aSet |
	aSet := CADSM.Misc.CADSMMiscOrderedSet new: 10.
	self selectSurface: aBlock into: aSet.
	^aSet</body>

<body package="CADSM-NMT" selector="selectVertex:">selectVertex: aBlock 
	| aSet |
	aSet := CADSM.Misc.CADSMMiscOrderedSet new: 10.
	self selectVertex: aBlock into: aSet.
	^aSet</body>

<body package="CADSM-NMT" selector="selectVertex:into:">selectVertex: aBlock into: aSet 
	self subclassResponsibility</body>

<body package="CADSM-NMT" selector="selectVertexUse:">selectVertexUse: aBlock 
	| aSet |
	aSet := CADSM.Misc.CADSMMiscOrderedSet new: 10.
	self selectVertexUse: aBlock into: aSet.
	^aSet</body>

<body package="CADSM-NMT" selector="selectVertexUse:into:">selectVertexUse: aBlock into: aSet 
	self subclassResponsibility</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTAnyNMT</class-id> <category>testing</category>

<body package="CADSM-NMT" selector="hasAlpha">hasAlpha
	^self alpha notNil</body>

<body package="CADSM-NMT" selector="hasPaint">hasPaint
	^self paint notNil</body>

<body package="CADSM-NMT" selector="hasStipple">hasStipple
	^self stipplePattern notNil</body>

<body package="CADSM-NMT" selector="includesEdge:">includesEdge: aEdge 
	^(self selectEdge: [:item | item == aEdge]) notEmpty</body>

<body package="CADSM-NMT" selector="includesEdgeUse:">includesEdgeUse: aEdgeUse 
	^(self selectEdgeUse: [:item | item == aEdgeUse]) notEmpty</body>

<body package="CADSM-NMT" selector="includesFace:">includesFace: aFace 
	^(self selectFace: [:item | item == aFace]) notEmpty</body>

<body package="CADSM-NMT" selector="includesFaceUse:">includesFaceUse: aFaceUse 
	^(self selectFaceUse: [:item | item == aFaceUse]) notEmpty</body>

<body package="CADSM-NMT" selector="includesLoop:">includesLoop: aLoop 
	^(self selectLoop: [:item | item == aLoop]) notEmpty</body>

<body package="CADSM-NMT" selector="includesLoopUse:">includesLoopUse: aLoopUse 
	^(self selectLoopUse: [:item | item == aLoopUse]) notEmpty</body>

<body package="CADSM-NMT" selector="includesRegion:">includesRegion: aRegion 
	^(self selectRegion: [:item | item == aRegion]) notEmpty</body>

<body package="CADSM-NMT" selector="includesShell:">includesShell: aShell 
	^(self selectShell: [:item | item == aShell]) notEmpty</body>

<body package="CADSM-NMT" selector="includesVertex:">includesVertex: aVertex 
	^(self selectVertex: [:item | item == aVertex]) notEmpty</body>

<body package="CADSM-NMT" selector="includesVertexUse:">includesVertexUse: aVertexUse 
	^(self selectVertexUse: [:item | item == aVertexUse]) notEmpty</body>

<body package="CADSM-NMT" selector="isVertexUse">isVertexUse
	^false</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTAnyNMT</class-id> <category>calc</category>

<body package="CADSM-NMT" selector="calcBoundingBox">calcBoundingBox
	aSup ifNotNil: [aSup clearBoundingBox]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTAnyNMT</class-id> <category>initialize-release</category>

<body package="CADSM-NMT" selector="preSave">preSave
	self subclassResponsibility</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTItemUse</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aNMTItem">aNMTItem
	^aNMTItem</body>

<body package="CADSM-NMT" selector="aNMTItem:">aNMTItem: anObject
	aNMTItem := anObject</body>

<body package="CADSM-NMT" selector="die">die
	self removeSup.
	aNMTItem ifNotNil: 
			[:aaNMTItem | 
			aNMTItem := nil.
			aaNMTItem removeSub: self]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTPairedUse</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aNurbs:">aNurbs: aNurbs 
	self removeActionsForEvent: #getNurbs.
	aNurbs ifNotNil: 
			[self 
				when: #getNurbs
				ask: aNurbs
				perform: #yourself]</body>

<body package="CADSM-NMT" selector="glNurbs">glNurbs
	^(self triggerEvent: #glNurbs) ifNil: 
			[| answer |
			answer := self create_glNurbs.
			self glNurbs: answer.
			answer]</body>

<body package="CADSM-NMT" selector="glNurbs:">glNurbs: glNurbs 
	self removeActionsForEvent: #glNurbs.
	glNurbs ifNotNil: 
			[self 
				when: #glNurbs
				ask: glNurbs
				perform: #yourself]</body>

<body package="CADSM-NMT" selector="mate">mate
	^mate</body>

<body package="CADSM-NMT" selector="mate:">mate: aPairedUse 
	mate := aPairedUse.
	aPairedUse 
		ifNotNil: [aPairedUse mate == self ifFalse: [aPairedUse mate: self]]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTFaceUse</class-id> <category>initialize-release</category>

<body package="CADSM-NMT" selector="die">die
	cLoopUse shallowCopy do: [:aLoopUse | aLoopUse die].
	aSurface ifNotNil: 
			[:aaSurface | 
			aSurface := nil.
			aaSurface removeSup].
	mate ifNotNil: 
			[:amate | 
			self mate: nil.
			amate die].
	super die</body>

<body package="CADSM-NMT" selector="initialize">initialize
	cLoopUse := CADSM.Misc.CADSMMiscOrderedSet new</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTFaceUse</class-id> <category>printing</category>

<body package="CADSM-NMT" selector="printOn:">printOn: aStream 
	aStream nextPutAll: 'aFU'.
	aStream print: (self selectFaceUse: [:item | true]) size.
	aStream nextPutAll: ':LU'.
	aStream print: (self selectLoopUse: [:item | true]) size.
	aStream nextPutAll: ':EU'.
	aStream print: (self selectEdgeUse: [:item | true]) size.
	aStream nextPutAll: ':VU'.
	aStream print: (self selectVertexUse: [:item | true]) size</body>

<body package="CADSM-NMT" selector="printVerboseOn:">printVerboseOn: aStream 
	aStream
		nextPutAll: 'FaceUse';
		cr;
		nextPutAll: 'isSameSense = ';
		printVerbose: isSameSense;
		cr;
		printVerbose: aSurface;
		cr;
		printVerbose: cLoopUse</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTFaceUse</class-id> <category>displaying</category>

<body package="CADSM-NMT" selector="renderOn1:">renderOn1: aRenderingContext 
	cLoopUse do: [:aLoopUse | aLoopUse renderOn: aRenderingContext]</body>

<body package="CADSM-NMT" selector="renderOn:">renderOn: aRenderingContext 
	"All face and edge geometry must be in sketch frame coordinates."

	aRenderingContext paint: self aColor.
	aRenderingContext pushTransformation: aSurface aSketchRefFrame aMFf
		while: [aRenderingContext displayFaceUse: self]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTFaceUse</class-id> <category>copying</category>

<body package="CADSM-NMT" selector="postCopy">postCopy
	self halt: 'Check this.'.
	aNMTItem := aNMTItem copy.
	cLoopUse copy do: [:aLoopUse | self addLoopUse: aLoopUse].
	self aSurface: aSurface copy</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTFaceUse</class-id> <category>testing</category>

<body package="CADSM-NMT" selector="mark">mark
	^mark</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTFaceUse</class-id> <category>ops on self</category>

<body package="CADSM-NMT" selector="calcuvBound">calcuvBound
	| outerLoopUse aBoundingRectangle |
	outerLoopUse := cLoopUse first.
	aBoundingRectangle := CADSMMiscBoundingRectangle new.
	outerLoopUse ccuv 
		do: [:cuv | cuv do: [:uv | aBoundingRectangle expandToBound: uv]].
	^aBoundingRectangle</body>

<body package="CADSM-NMT" selector="conditionGeometry">conditionGeometry
	"Adjust surface so that u,v values are in range."

	| uvShift |
	uvShift := aSurface uvShiftToFituvBound: self uvBound.
	uvShift ifNotNil: [CADSM.UI.STEP.SurfaceChangedException raiseSignal]</body>

<body package="CADSM-NMT" selector="conditionGeometry1">conditionGeometry1
	"Adjust surface and trim curves so that u,v values are in range."

	| uvBound uvShift |
	uvBound := CADSM.Misc.CADSMMiscBoundingRectangle new.
	cLoopUse do: 
			[:aLoopUse | 
			aLoopUse cEdgeUse 
				do: [:aEdgeUse | uvBound expandToBound: aEdgeUse aCurve uvBound]].
	uvShift := aSurface uvShiftToFituvBound: uvBound.
	uvShift ifNotNil: 
			[cLoopUse 
				do: [:aLoopUse | aLoopUse cEdgeUse do: [:aEdgeUse | aEdgeUse aCurve uvShift: uvShift]]]</body>

<body package="CADSM-NMT" selector="conditionGeometry2">conditionGeometry2
	"Adjust surface and trim curves so that u,v values are in range."

	| uvShift |
	uvShift := aSurface uvShiftToFituvBound: self uvBound.
	uvShift ifNotNil: 
			[cLoopUse 
				do: [:aLoopUse | aLoopUse cEdgeUse do: [:aEdgeUse | aEdgeUse aCurve uvShift: uvShift]]]</body>

<body package="CADSM-NMT" selector="conditionSelf">conditionSelf
	(aSurface isMemberOf: CADSMGeoRectSurface) 
		ifFalse: 
			[| outerLoopUse aBoundingRectangle |
			outerLoopUse := cLoopUse first.
			outerLoopUse conditionSelf.
			aBoundingRectangle := CADSMMiscBoundingRectangle new.
			outerLoopUse ccuv 
				do: [:cuv | cuv do: [:uv | aBoundingRectangle expandToBound: uv]].
			2 to: cLoopUse size
				do: [:i | (cLoopUse at: i) conditionSelfWithin: aBoundingRectangle].
			self aSurface condition_cLoopUse: cLoopUse within: aBoundingRectangle.
			self finalize_cLoopUse]</body>

<body package="CADSM-NMT" selector="condition_aLoopUse:aBoundingRectangle:">condition_aLoopUse: aLoopUse aBoundingRectangle: aBoundingRectangle 
	"
	Assume there is at most only one singularity per loop.
	(cFaceEdgeUse at: iStart) can have a discontinuity at the beginning.
	Connect the rest beginning from iStart.
	"

	| cFaceEdgeUse n iStart newBoundingRectangle |
	cFaceEdgeUse := aLoopUse cItemUse.
	n := cFaceEdgeUse size.
	iStart := 1.
	1 to: n
		do: 
			[:i | 
			| cEndSingularity |
			cEndSingularity := aSurface cEndSingularityOf: (cFaceEdgeUse at: i) aCurve.
			cEndSingularity first 
				ifTrue: 
					[iStart == 1 ifTrue: [iStart := i] ifFalse: [self assert: [iStart = i]]]
				ifFalse: 
					[cEndSingularity last 
						ifTrue: 
							[iStart == 1 ifTrue: [iStart := i + 1] ifFalse: [self assert: [false]]]]].
	newBoundingRectangle := CADSMMiscBoundingRectangle new.
	newBoundingRectangle expandToBound: (aSurface 
				condition_cuv: (cFaceEdgeUse at: (iStart cyclic: n)) aCurve
				within: aBoundingRectangle).
	2 to: n
		do: 
			[:i | 
			| ii iipre |
			ii := iStart - 1 + i cyclic: n.
			iipre := ii - 1 cyclic: n.
			(cFaceEdgeUse at: iipre) aCurve uv_connectTo: (cFaceEdgeUse at: ii) aCurve.
			newBoundingRectangle 
				expandToBound: (aSurface condition_cuv: (cFaceEdgeUse at: ii) aCurve
						within: aBoundingRectangle)].
	^newBoundingRectangle</body>

<body package="CADSM-NMT" selector="condition_cLoopUse">condition_cLoopUse
	| aBoundingRectangle |
	aBoundingRectangle := self condition_aLoopUse: cLoopUse first
				aBoundingRectangle: CADSMMiscBoundingRectangle new.
	self uvBound: aBoundingRectangle.
	2 to: cLoopUse size
		do: 
			[:i | 
			self condition_aLoopUse: (cLoopUse at: i)
				aBoundingRectangle: aBoundingRectangle]</body>

<body package="CADSM-NMT" selector="condition_cLoopUse1">condition_cLoopUse1
	cLoopUse do: 
			[:aLoopUse | 
			| cFaceEdgeUse n ccEndSingularity |
			cFaceEdgeUse := aLoopUse cItemUse.
			n := cFaceEdgeUse size.
			ccEndSingularity := cFaceEdgeUse 
						collect: [:aFaceEdgeUse | aSurface cEndSingularityOf: aFaceEdgeUse aCurve].
			1 to: n
				do: 
					[:i | 
					| ipre |
					ipre := i - 1 cyclic: n.
					(ccEndSingularity at: ipre) last 
						ifFalse: 
							[(ccEndSingularity at: i) first 
								ifFalse: 
									[(cFaceEdgeUse at: ipre) aCurve uv_connectTo: (cFaceEdgeUse at: i) aCurve]].
					aSurface finalize_uvCurve: (cFaceEdgeUse at: i) aCurve]]</body>

<body package="CADSM-NMT" selector="condition_cLoopUse2">condition_cLoopUse2
	"
	Assume there is at most only one singularity per loop.
	(cFaceEdgeUse at: iStart) can have a discontinuity at the beginning.
	Connect the rest beginning from iStart.
	"

	cLoopUse do: 
			[:aLoopUse | 
			| cFaceEdgeUse n iStart |
			cFaceEdgeUse := aLoopUse cItemUse.
			n := cFaceEdgeUse size.
			iStart := 1.
			1 to: n
				do: 
					[:i | 
					| cEndSingularity |
					cEndSingularity := aSurface cEndSingularityOf: (cFaceEdgeUse at: i) aCurve.
					cEndSingularity first 
						ifTrue: 
							[iStart == 1 ifTrue: [iStart := i] ifFalse: [self assert: [iStart = i]]]
						ifFalse: 
							[cEndSingularity last 
								ifTrue: 
									[iStart == 1 ifTrue: [iStart := i + 1] ifFalse: [self assert: [false]]]]].
			aSurface finalize_uvCurve: (cFaceEdgeUse at: iStart) aCurve.
			2 to: n
				do: 
					[:i | 
					| ii iipre |
					ii := iStart - 1 + i.
					iipre := ii - 1 cyclic: n.
					(cFaceEdgeUse at: iipre) aCurve uv_connectTo: (cFaceEdgeUse at: ii) aCurve.
					aSurface finalize_uvCurve: (cFaceEdgeUse at: ii) aCurve]]</body>

<body package="CADSM-NMT" selector="condition_cLoopUse3">condition_cLoopUse3
	| aBoundingRectangle |
	aBoundingRectangle := self condition_aLoopUse: cLoopUse first
				aBoundingRectangle: CADSMMiscBoundingRectangle new.
	self uvBound: aBoundingRectangle.
	2 to: cLoopUse size
		do: 
			[:i | 
			self condition_aLoopUse: (cLoopUse at: i)
				aBoundingRectangle: aBoundingRectangle]</body>

<body package="CADSM-NMT" selector="condition_glLoopUse:aBoundingRectangle:">condition_glLoopUse: aLoopUse aBoundingRectangle: aBoundingRectangle 
	"
	Assume there is at most only one singularity per loop.
	(cFaceEdgeUse at: iStart) can have a discontinuity at the beginning.
	Connect the rest beginning from iStart.
	"

	| cFaceEdgeUse n iStart newBoundingRectangle |
	cFaceEdgeUse := aLoopUse cItemUse.
	n := cFaceEdgeUse size.
	iStart := 1.
	1 to: n
		do: 
			[:i | 
			| cEndSingularity |
			cEndSingularity := self aSurface 
						cEndSingularityOf: (cFaceEdgeUse at: i) glTrimNurbs.
			cEndSingularity first 
				ifTrue: 
					[iStart == 1 ifTrue: [iStart := i] ifFalse: [self assert: [iStart = i]]]
				ifFalse: 
					[cEndSingularity last 
						ifTrue: 
							[iStart == 1 ifTrue: [iStart := i + 1] ifFalse: [self assert: [false]]]]].
	newBoundingRectangle := CADSMMiscBoundingRectangle new.
	newBoundingRectangle expandToBound: (self glNurbs 
				condition_cuv: (cFaceEdgeUse at: (iStart cyclic: n)) glTrimNurbs
				within: aBoundingRectangle).
	2 to: n
		do: 
			[:i | 
			| ii iipre |
			ii := iStart - 1 + i cyclic: n.
			iipre := ii - 1 cyclic: n.
			(cFaceEdgeUse at: iipre) glTrimNurbs 
				uv_connectTo: (cFaceEdgeUse at: ii) glTrimNurbs.
			newBoundingRectangle expandToBound: (self glNurbs 
						condition_cuv: (cFaceEdgeUse at: ii) glTrimNurbs
						within: aBoundingRectangle)].
	^newBoundingRectangle</body>

<body package="CADSM-NMT" selector="finalize_cLoopUse">finalize_cLoopUse
	cLoopUse do: 
			[:aLoopUse | 
			aLoopUse cFaceEdgeUse 
				do: [:aFaceEdgeUse | aFaceEdgeUse aCurve ifNotNil: [:aCurve | aCurve finalize_cuv]]]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTFaceUse</class-id> <category>enumerating</category>

<body package="CADSM-NMT" selector="markAllOnSameSide">markAllOnSameSide
	mark 
		ifFalse: 
			[mark := true.
			cLoopUse do: 
					[:aLoopUse | 
					aLoopUse cEdgeUse 
						do: [:aEdgeUse | aEdgeUse radial aFaceUse markAllOnSameSide]]]</body>

<body package="CADSM-NMT" selector="selectEdge:into:">selectEdge: aBlock into: aSet 
	cLoopUse do: [:each | each selectEdge: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectEdgeUse:into:">selectEdgeUse: aBlock into: aSet 
	cLoopUse do: [:each | each selectEdgeUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectFace:into:">selectFace: aBlock into: aSet 
	aNMTItem selectFace: aBlock into: aSet</body>

<body package="CADSM-NMT" selector="selectFaceUse:into:">selectFaceUse: aBlock into: aSet 
	(aBlock value: self) ifTrue: [aSet add: self]</body>

<body package="CADSM-NMT" selector="selectLoop:into:">selectLoop: aBlock into: aSet 
	cLoopUse do: [:each | each selectLoop: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectLoopUse:into:">selectLoopUse: aBlock into: aSet 
	cLoopUse do: [:each | each selectLoopUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectSurface:into:">selectSurface: aBlock into: aSet 
	(aBlock value: aSurface) ifTrue: [aSet add: aSurface]</body>

<body package="CADSM-NMT" selector="selectVertex:into:">selectVertex: aBlock into: aSet 
	cLoopUse do: [:each | each selectVertex: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectVertexUse:into:">selectVertexUse: aBlock into: aSet 
	cLoopUse do: [:each | each selectVertexUse: aBlock into: aSet]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTFaceUse</class-id> <category>nurbs</category>

<body package="CADSM-NMT" selector="controlPointAtU:v:">controlPointAtU: u v: v 
	^aSurface controlPointAtU: u v: v</body>

<body package="CADSM-NMT" selector="create_glNurbs">create_glNurbs
	| glNurbs |
	glNurbs := self aSurface glNurbs.
	^isSameSense ifTrue: [glNurbs] ifFalse: [glNurbs reverse]</body>

<body package="CADSM-NMT" selector="trimCurvesDo:">trimCurvesDo: arg1
	"Dummy method template.  This was installed by the debugger
	define method command."

	^self halt</body>

<body package="CADSM-NMT" selector="uKnotVector">uKnotVector
	^aSurface uKnotVector</body>

<body package="CADSM-NMT" selector="uOrder">uOrder
	^aSurface uOrder</body>

<body package="CADSM-NMT" selector="uSize">uSize
	^aSurface uSize</body>

<body package="CADSM-NMT" selector="vKnotVector">vKnotVector
	^aSurface vKnotVector</body>

<body package="CADSM-NMT" selector="vSize">vSize
	^aSurface vSize</body>

<body package="CADSM-NMT" selector="weightAtU:v:">weightAtU: u v: v 
	^aSurface weightAtU: u v: v</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTFaceUse</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="addIntoShellUse:">addIntoShellUse: aShellUse 
	^aShellUse addFaceUse: self</body>

<body package="CADSM-NMT" selector="addLoopUse:">addLoopUse: aLoopUse 
	"aSub maybe already in a tree. Make sure aSub is released by its aSup."

	aLoopUse removeSup.
	cLoopUse add: aLoopUse.
	aLoopUse aSup: self.
	^aLoopUse</body>

<body package="CADSM-NMT" selector="addMateGeometry">addMateGeometry
	mate aSurface: aSurface.
	mate isSameSense: false.
	cLoopUse do: [:aLoopUse | aLoopUse addMateGeometry]</body>

<body package="CADSM-NMT" selector="addPositiveSurface:">addPositiveSurface: aaSurface 
	| positiveFaceUse negativeFaceUse |
	positiveFaceUse := self.
	negativeFaceUse := positiveFaceUse mate.
	positiveFaceUse aSurface: aaSurface.
	negativeFaceUse aSurface: aaSurface.
	positiveFaceUse isSameSense: true.
	negativeFaceUse isSameSense: false</body>

<body package="CADSM-NMT" selector="aFace">aFace
	^aNMTItem</body>

<body package="CADSM-NMT" selector="aFaceUse">aFaceUse
	^self</body>

<body package="CADSM-NMT" selector="aSketch">aSketch
	^aSurface aSketch</body>

<body package="CADSM-NMT" selector="aSketchRefFrame">aSketchRefFrame
	^aSurface aSketchRefFrame</body>

<body package="CADSM-NMT" selector="aSurface">aSurface
	^aSurface ifNil: 
			[self aSurface: aNMTItem aSurface copy.
			isSameSense ifFalse: [aSurface reverseSelf].
			aSurface]</body>

<body package="CADSM-NMT" selector="aSurface:">aSurface: aaSurface 
	self aModel addSurface: aaSurface.
	aSurface := aaSurface</body>

<body package="CADSM-NMT" selector="ccglTrimNurbs">ccglTrimNurbs
	^(self triggerEvent: #ccglTrimNurbs) ifNil: 
			[| answer |
			answer := self create_ccglTrimNurbs.
			self ccglTrimNurbs: answer.
			answer]</body>

<body package="CADSM-NMT" selector="ccglTrimNurbs1">ccglTrimNurbs1
	| cNurbs |
	cNurbs := OrderedCollection new.
	cNurbs 
		add: (CADSMGeoNurbsCurve fromStart: (StMFullColumn with: 0.0d with: 0.0d)
				toEnd: (StMFullColumn with: 1.0d with: 0.0d)).
	cNurbs 
		add: (CADSMGeoNurbsCurve fromStart: (StMFullColumn with: 1.0d with: 0.0d)
				toEnd: (StMFullColumn with: 1.0d with: 1.0d)).
	cNurbs 
		add: (CADSMGeoNurbsCurve fromStart: (StMFullColumn with: 1.0d with: 1.0d)
				toEnd: (StMFullColumn with: 0.0d with: 1.0d)).
	cNurbs 
		add: (CADSMGeoNurbsCurve fromStart: (StMFullColumn with: 0.0d with: 1.0d)
				toEnd: (StMFullColumn with: 0.0d with: 0.0d)).
	^Array with: cNurbs</body>

<body package="CADSM-NMT" selector="ccglTrimNurbs11">ccglTrimNurbs11
	| cNurbs |
	cNurbs := OrderedCollection new.
	cNurbs 
		add: (CADSMGeoNurbsCurve fromStart: (StMFullColumn with: 0.0d with: 0.0d)
				toEnd: (StMFullColumn with: 0.0d with: 1.0d)).
	cNurbs 
		add: (CADSMGeoNurbsCurve fromStart: (StMFullColumn with: 0.0d with: 1.0d)
				toEnd: (StMFullColumn with: -1.0d with: 1.0d)).
	cNurbs 
		add: (CADSMGeoNurbsCurve fromStart: (StMFullColumn with: -1.0d with: 1.0d)
				toEnd: (StMFullColumn with: -1.0d with: 0.0d)).
	cNurbs 
		add: (CADSMGeoNurbsCurve fromStart: (StMFullColumn with: -1.0d with: 0.0d)
				toEnd: (StMFullColumn with: 0.0d with: 0.0d)).
	^Array with: cNurbs</body>

<body package="CADSM-NMT" selector="ccglTrimNurbs2">ccglTrimNurbs2
	^(self triggerEvent: #ccglTrimNurbs) ifNil: 
			[| answer |
			answer := self create_ccglTrimNurbs.
			self ccglTrimNurbs: answer.
			answer]</body>

<body package="CADSM-NMT" selector="ccglTrimNurbs:">ccglTrimNurbs: ccglTrimNurbs 
	self removeActionsForEvent: #ccglTrimNurbs.
	ccglTrimNurbs ifNotNil: 
			[self 
				when: #ccglTrimNurbs
				ask: ccglTrimNurbs
				perform: #yourself]</body>

<body package="CADSM-NMT" selector="cLoopUse">cLoopUse
	^cLoopUse</body>

<body package="CADSM-NMT" selector="cLoopUse:">cLoopUse: anObject
	cLoopUse := anObject</body>

<body package="CADSM-NMT" selector="create_ccglTrimNurbs">create_ccglTrimNurbs
	| tol answer ccglTrimNurbs aStream cglTrimNurbs uvEnd nextcglTrimNurbs uvStart aglTrimNurbs |
	tol := 1.0d-6.
	answer := CADSM.Misc.CADSMMiscOrderedSet new.
	ccglTrimNurbs := self cLoopUse 
				collect: [:aLoopUse | aLoopUse cglTrimNurbs].
	aStream := ccglTrimNurbs readStream.
	[aStream atEnd] whileFalse: 
			[cglTrimNurbs := CADSM.Misc.CADSMMiscOrderedSet new.
			cglTrimNurbs addAll: aStream next.
			(cglTrimNurbs last uvEnd - cglTrimNurbs first uvStart) length &lt; tol 
				ifFalse: 
					[
					[uvEnd := cglTrimNurbs last uvEnd.
					nextcglTrimNurbs := aStream atEnd 
								ifTrue: [ccglTrimNurbs first]
								ifFalse: [aStream next].
					uvStart := nextcglTrimNurbs first uvStart.
					aglTrimNurbs := CADSMGeoNurbsCurve 
								fromStart: uvEnd copy
								toEnd: uvStart copy
								isSpatial: false.
					cglTrimNurbs add: aglTrimNurbs.
					(cglTrimNurbs last uvEnd - cglTrimNurbs first uvStart) length &lt; tol] 
							whileFalse: [cglTrimNurbs addAll: nextcglTrimNurbs]].
			answer add: cglTrimNurbs].
	^answer</body>

<body package="CADSM-NMT" selector="create_cglTrimNurbs">create_cglTrimNurbs
	| tol cglTrimNurbs ccglTrimNurbs icglTrimNurbs iicglTrimNurbs uvEnd uvStart aglTrimNurbs |
	tol := 1.0d-6.
	cglTrimNurbs := CADSM.Misc.CADSMMiscOrderedSet new.
	ccglTrimNurbs := self cLoopUse 
				collect: [:aLoopUse | aLoopUse cglTrimNurbs].
	1 to: ccglTrimNurbs size
		do: 
			[:i | 
			icglTrimNurbs := ccglTrimNurbs at: i.
			cglTrimNurbs addAll: icglTrimNurbs.
			iicglTrimNurbs := ccglTrimNurbs cyclic_at: i + 1.
			uvEnd := icglTrimNurbs last uvEnd.
			uvStart := iicglTrimNurbs first uvStart.
			(uvEnd - uvStart) length &lt; tol 
				ifFalse: 
					[aSurface name: #debug.
					aglTrimNurbs := CADSMGeoNurbsCurve 
								fromStart: uvEnd copy
								toEnd: uvStart copy
								isSpatial: false.
					cglTrimNurbs add: aglTrimNurbs]].
	^cglTrimNurbs</body>

<body package="CADSM-NMT" selector="create_glSurface">create_glSurface
	| glSurface |
	glSurface := self aSurface glSurface.
	^isSameSense ifTrue: [glSurface] ifFalse: [glSurface reverse]</body>

<body package="CADSM-NMT" selector="cSub">cSub
	^cLoopUse</body>

<body package="CADSM-NMT" selector="glSurface">glSurface
	^(self triggerEvent: #glSurface) ifNil: 
			[| answer |
			answer := self aSurface glSurface.
			self glSurface: answer.
			answer]</body>

<body package="CADSM-NMT" selector="glSurface:">glSurface: glSurface 
	self removeActionsForEvent: #glSurface.
	glSurface ifNotNil: 
			[self 
				when: #glSurface
				ask: glSurface
				perform: #yourself]</body>

<body package="CADSM-NMT" selector="isSameSense">isSameSense
	^isSameSense</body>

<body package="CADSM-NMT" selector="isSameSense:">isSameSense: anObject
	isSameSense := anObject</body>

<body package="CADSM-NMT" selector="negated">negated
	isSameSense := isSameSense not</body>

<body package="CADSM-NMT" selector="rSkFacePointSkAt:">rSkFacePointSkAt: uv 
	| arg |
	arg := isSameSense 
				ifTrue: [uv]
				ifFalse: 
					[(uv copy)
						at: 2 put: (uv at: 2) negated;
						yourself].
	^aSurface rSkFacePointSkAt: arg</body>

<body package="CADSM-NMT" selector="unmark">unmark
	mark := false</body>

<body package="CADSM-NMT" selector="uvBound">uvBound
	^self triggerEvent: #uvBound</body>

<body package="CADSM-NMT" selector="uvBound:">uvBound: uvBound 
	self removeActionsForEvent: #uvBound.
	uvBound ifNotNil: 
			[self 
				when: #uvBound
				ask: uvBound
				perform: #yourself]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTFaceUse</class-id> <category>As yet unclassified</category>

<body package="CADSM-NMT" selector="removeSurface">removeSurface
	aSurface := nil.
	cLoopUse do: [:aLoopUse | aLoopUse removeCurves]</body>

<body package="CADSM-NMT" selector="undateNMTSurface:">undateNMTSurface: aNMTSurface 
	aNMTItem txaSurface: aNMTSurface</body>

<body package="CADSM-NMT" selector="updateuvCurves">updateuvCurves
	| xyzSurface |
	xyzSurface := self xyzSurface.
	cLoopUse do: [:aLoopUse | aLoopUse updateuvCurvesOn: xyzSurface]</body>

<body package="CADSM-NMT" selector="xyzSurface">xyzSurface
	^aSurface ifNil: 
			[self aSurface: aNMTItem aSurface copy.
			isSameSense ifFalse: [aSurface reverseSelf].
			aSurface]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTShellUse</class-id> <category>enumerating</category>

<body package="CADSM-NMT" selector="selectEdge:into:">selectEdge: aBlock into: aSet 
	cItemUse do: [:each | each selectEdge: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectEdgeUse:into:">selectEdgeUse: aBlock into: aSet 
	cItemUse do: [:each | each selectEdgeUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectFace:into:">selectFace: aBlock into: aSet 
	cItemUse do: [:each | each selectFace: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectFaceUse:into:">selectFaceUse: aBlock into: aSet 
	cItemUse do: [:each | each selectFaceUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectLoop:into:">selectLoop: aBlock into: aSet 
	cItemUse do: [:each | each selectLoop: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectLoopUse:into:">selectLoopUse: aBlock into: aSet 
	cItemUse do: [:each | each selectLoopUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectShell:into:">selectShell: aBlock into: aSet 
	aNMTItem selectShell: aBlock into: aSet</body>

<body package="CADSM-NMT" selector="selectShellUse:into:">selectShellUse: aBlock into: aSet 
	(aBlock value: self) ifTrue: [aSet add: self]</body>

<body package="CADSM-NMT" selector="selectVertex:into:">selectVertex: aBlock into: aSet 
	cItemUse do: [:each | each selectVertex: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectVertexUse:into:">selectVertexUse: aBlock into: aSet 
	cItemUse do: [:each | each selectVertexUse: aBlock into: aSet]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTShellUse</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="addEdgeUse:">addEdgeUse: aEdgeUse 
	"aSub maybe already in a tree. Make sure aSub is released by its aSup."

	(aEdgeUse isMemberOf: CADSMNMTWireEdgeUse) 
		ifFalse: [aEdgeUse changeClassToThatOf: CADSMNMTWireEdgeUse basicNew].
	aEdgeUse removeSup.
	cItemUse add: aEdgeUse.
	aEdgeUse aSup: self.
	^aEdgeUse</body>

<body package="CADSM-NMT" selector="addFaceUse:">addFaceUse: aFaceUse 
	"aSub maybe already in a tree. Make sure aSub is released by its aSup."

	aFaceUse removeSup.
	cItemUse add: aFaceUse.
	aFaceUse aSup: self.
	^aFaceUse</body>

<body package="CADSM-NMT" selector="addSub:">addSub: aSub 
	^aSub addIntoShellUse: self</body>

<body package="CADSM-NMT" selector="addVertexUse:">addVertexUse: aVertexUse 
	"aSub maybe already in a tree. Make sure aSub is released by its aSup."

	(aVertexUse isMemberOf: CADSMNMTShellVertexUse) 
		ifFalse: [aVertexUse changeClassToThatOf: CADSMNMTShellVertexUse basicNew].
	aVertexUse removeSup.
	cItemUse add: aVertexUse.
	aVertexUse aSup: self.
	^aVertexUse</body>

<body package="CADSM-NMT" selector="aShell">aShell
	^aNMTItem</body>

<body package="CADSM-NMT" selector="aShellUse">aShellUse
	^self</body>

<body package="CADSM-NMT" selector="cSub">cSub
	^cItemUse</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTShellUse</class-id> <category>testing</category>

<body package="CADSM-NMT" selector="includes:">includes: aaNMTItem 
	^self == aaNMTItem 
		ifTrue: [true]
		ifFalse: 
			[(cItemUse detect: [:aItemUse | aItemUse includes: aaNMTItem] ifNone: nil) 
				notNil]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTShellUse</class-id> <category>initialize-release</category>

<body package="CADSM-NMT" selector="initialize">initialize
	cItemUse := CADSM.Misc.CADSMMiscOrderedSet new</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTShellUse</class-id> <category>displaying</category>

<body package="CADSM-NMT" selector="renderOn1:">renderOn1: aRenderingContext 
	cItemUse do: [:aItemUse | aItemUse renderOn: aRenderingContext].
	aRenderingContext toTranscriptShowError</body>

<body package="CADSM-NMT" selector="renderOn2:">renderOn2: aRenderingContext 
	| aDummy |
	aDummy := cItemUse select: 
					[:aItemUse | 
					(aItemUse aSurface respondsTo: #cSingularity) 
						and: [aItemUse aSurface cSingularity isEmpty not]].
	aDummy do: [:aItemUse | aItemUse renderOn: aRenderingContext].
	aRenderingContext toTranscriptShowError</body>

<body package="CADSM-NMT" selector="renderOn31:">renderOn31: aRenderingContext 
	| aDummy |
	aDummy := cItemUse 
				select: [:aItemUse | aItemUse aSurface isMemberOf: CADSMGeoNurbsSurface].
	aDummy do: [:aItemUse | aItemUse renderOn: aRenderingContext].
	aRenderingContext toTranscriptShowError</body>

<body package="CADSM-NMT" selector="renderOn32:">renderOn32: aRenderingContext 
	| aDummy |
	aDummy := cItemUse 
				select: [:aItemUse | aItemUse aSurface isMemberOf: CADSMGeoConicalSurface].
	aDummy do: [:aItemUse | aItemUse renderOn: aRenderingContext].
	aRenderingContext toTranscriptShowError</body>

<body package="CADSM-NMT" selector="renderOn3:">renderOn3: aRenderingContext 
	| aDummy |
	aDummy := cItemUse select: [:aItemUse | aItemUse aSurface name == #debug].
	aDummy do: [:aItemUse | aItemUse renderOn: aRenderingContext].
	aRenderingContext toTranscriptShowError</body>

<body package="CADSM-NMT" selector="renderOn4:">renderOn4: aRenderingContext 
	| aDummy |
	aDummy := cItemUse select: [:aItemUse | aItemUse aSurface name == #debug].
	aDummy isEmpty ifFalse: [(aDummy at: 1) renderOn: aRenderingContext].
	aDummy isEmpty ifFalse: [(aDummy at: 2) renderOn: aRenderingContext].
	aDummy isEmpty ifFalse: [(aDummy at: 3) renderOn: aRenderingContext].
	aRenderingContext toTranscriptShowError</body>

<body package="CADSM-NMT" selector="renderOn5:">renderOn5: aRenderingContext 
	(cItemUse at: 127) renderOn: aRenderingContext.
	aRenderingContext toTranscriptShowError</body>

<body package="CADSM-NMT" selector="renderOn6:">renderOn6: aRenderingContext 
	| n aItemUse |
	n := cItemUse size.
	1 to: n
		do: 
			[:i | 
			(i &gt;= 1 and: [i &lt;= 50]) 
				ifTrue: 
					[aItemUse := cItemUse at: i.
					aItemUse renderOn: aRenderingContext]].
	aRenderingContext toTranscriptShowError</body>

<body package="CADSM-NMT" selector="renderOn:">renderOn: aRenderingContext 
	"
	When showIndex is nil, run normal. Otherwise it is for debug.
	CADSMGeoRectSurface CADSMGeoNurbsSurface CADSMGeoConicalSurface CADSMGeoCylindricalSurface CADSMGeoSphericalSurface CADSMGeoToroidalSurface CADSMGeoSweep 
	Dummy := nil.
	"

	| aDummy showIndex |
	Dummy 
		ifNil: [cItemUse do: [:aItemUse | aItemUse renderOn: aRenderingContext]]
		ifNotNil: 
			[Dummy := Dummy + 1.
			showIndex := Dummy.
			aDummy := cItemUse 
						select: [:aItemUse | aItemUse aSurface isMemberOf: CADSMGeoConicalSurface].
			Transcript
				cr;
				show: ('CADSMGeoConicalSurface &lt;1p&gt;/&lt;2p&gt;' expandMacrosWith: showIndex
							with: aDummy size).
			(showIndex positive and: [showIndex &lt;= aDummy size]) 
				ifTrue: [(aDummy at: showIndex) renderOn: aRenderingContext]
				ifFalse: [aDummy do: [:aItemUse | aItemUse renderOn: aRenderingContext]]].
	aRenderingContext toTranscriptShowError</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTShellUse</class-id> <category>printing</category>

<body package="CADSM-NMT" selector="printOn:">printOn: aStream 
	aStream nextPutAll: 'aSU'.
	aStream print: (self selectShellUse: [:item | true]) size.
	aStream nextPutAll: ':FU'.
	aStream print: (self selectFaceUse: [:item | true]) size.
	aStream nextPutAll: ':LU'.
	aStream print: (self selectLoopUse: [:item | true]) size.
	aStream nextPutAll: ':EU'.
	aStream print: (self selectEdgeUse: [:item | true]) size.
	aStream nextPutAll: ':VU'.
	aStream print: (self selectVertexUse: [:item | true]) size</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTVertexShellUse</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="addEdgeUse:">addEdgeUse: aEdgeUse 
	self removeShellVertexUse.
	self changeClassToThatOf: CADSMNMTShellUse basicNew.
	^self addEdgeUse: aEdgeUse</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTVertexShellUse</class-id> <category>As yet unclassified</category>

<body package="CADSM-NMT" selector="removeShellVertexUse">removeShellVertexUse
	| aShellVertexUse |
	aShellVertexUse := cItemUse first.
	aShellVertexUse die</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTConcreteNMT</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="die">die
	self removeSup</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTModel</class-id> <category>initialize-release</category>

<body package="CADSM-NMT" selector="initialize">initialize
	cFeature := CADSM.Misc.CADSMMiscOrderedSet new.
	cRegion := CADSM.Misc.CADSMMiscOrderedSet new.
	cShell := CADSM.Misc.CADSMMiscOrderedSet new.
	cFace := CADSM.Misc.CADSMMiscOrderedSet new.
	cLoop := CADSM.Misc.CADSMMiscOrderedSet new.
	cEdge := CADSM.Misc.CADSMMiscOrderedSet new.
	cVertex := CADSM.Misc.CADSMMiscOrderedSet new.
	self aRefFrame: CADSMGeoOriginFrame new.
	aBoundingBox := CADSM.Misc.CADSMMiscBoundingBox new.
	self addRegion: CADSMNMTOutsideRegion new</body>

<body package="CADSM-NMT" selector="preSave">preSave
"	self aOutsideRegion preSave."
	self removeDisplayList</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTModel</class-id> <category>printing</category>

<body package="CADSM-NMT" selector="printOn:">printOn: aStream 
	aStream nextPutAll: 'aM'.
	aStream print: (self selectModel: [:item | true]) size.
	aStream nextPutAll: ':R'.
	aStream print: (self selectRegion: [:item | true]) size.
	aStream nextPutAll: ':S'.
	aStream print: (self selectShell: [:item | true]) size.
	aStream nextPutAll: ':F'.
	aStream print: (self selectFace: [:item | true]) size.
	aStream nextPutAll: ':L'.
	aStream print: (self selectLoop: [:item | true]) size.
	aStream nextPutAll: ':E'.
	aStream print: (self selectEdge: [:item | true]) size.
	aStream nextPutAll: ':V'.
	aStream print: (self selectVertex: [:item | true]) size.
	aStream nextPutAll: ':FU'.
	aStream print: (self selectFaceUse: [:item | true]) size.
	aStream nextPutAll: ':LU'.
	aStream print: (self selectLoopUse: [:item | true]) size.
	aStream nextPutAll: ':EU'.
	aStream print: (self selectEdgeUse: [:item | true]) size.
	aStream nextPutAll: ':VU'.
	aStream print: (self selectVertexUse: [:item | true]) size</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTModel</class-id> <category>executing</category>

<body package="CADSM-NMT" selector="doORwith:">doORwith: aModel 
	"Do boolean OR. Do nothing for now."

	| cNewRegion |
	self emptySelf.
	cNewRegion := aModel selectRegion: [:aRegion | true].
	cNewRegion do: [:aRegion | self addRegion: aRegion]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTModel</class-id> <category>calc</category>

<body package="CADSM-NMT" selector="calcBoundingBox">calcBoundingBox
	self privateCalcBoundingBox.
	aSup ifNotNil: [aSup clearBoundingBox]</body>

<body package="CADSM-NMT" selector="calcMomentsOfVolume">calcMomentsOfVolume
	"To be implemented."

	^self notYetImplemented</body>

<body package="CADSM-NMT" selector="cItemWithBoundingBox">cItemWithBoundingBox
	self subclassResponsibility</body>

<body package="CADSM-NMT" selector="privateCalcBoundingBox">privateCalcBoundingBox
	| cFaceUse |
	cFaceUse := self aOutsideRegion selectFaceUse: [:aFaceUse | true].
	aBoundingBox := CADSM.Misc.CADSMMiscBoundingBox new.
	cFaceUse 
		do: [:aFaceUse | aBoundingBox expandToBound: aFaceUse aSurface aBoundingBoxF]</body>

<body package="CADSM-NMT" selector="privateCalcBoundingBox1">privateCalcBoundingBox1
	| tcVertex |
	tcVertex := self aOutsideRegion selectVertex: [:aVertex | true].
	aBoundingBox := CADSM.Misc.CADSMMiscBoundingBox new.
	tcVertex inject: aBoundingBox
		into: [:bbox :aVertex | bbox expandToBound: aVertex aPoint]


</body>

<body package="CADSM-NMT" selector="privateCalcBoundingBox2">privateCalcBoundingBox2
	| cFaceUse |
	cFaceUse := self aOutsideRegion selectFaceUse: [:aFaceUse | true].
	aBoundingBox := CADSM.Misc.CADSMMiscBoundingBox new.
	cFaceUse 
		do: [:aFaceUse | aBoundingBox expandToBound: aFaceUse aSurface aBoundingBoxF]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTModel</class-id> <category>displaying</category>

<body package="CADSM-NMT" selector="renderOn1:">renderOn1: aOpenGLContext 
	self removeDisplayList.
	self aOutsideRegion renderOn: aOpenGLContext</body>

<body package="CADSM-NMT" selector="renderOn2:">renderOn2: aOpenGLContext 
	| block |
	block := 
			[| listID |
			listID := aOpenGLContext 
						createDisplayList: [self aOutsideRegion 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]</body>

<body package="CADSM-NMT" selector="renderOn:">renderOn: aOpenGLContext 
	| block |
	block := 
			[| listID |
			listID := aOpenGLContext 
						createDisplayList: [self aOutsideRegion 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]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTModel</class-id> <category>ops</category>

<body package="CADSM-NMT" selector="buildCutFeature:">buildCutFeature: aCutFeature 
	self doDIFFwith: aCutFeature aModel</body>

<body package="CADSM-NMT" selector="buildExtrudedFeature:">buildExtrudedFeature: aExtrudedFeature 
	self doORwith: aExtrudedFeature aModel</body>

<body package="CADSM-NMT" selector="clear">clear
	cRegion asArray do: [:aRegion | self removeRegion: aRegion].
	cShell asArray do: [:aShell | self removeShell: aShell].
	cFace asArray do: [:aFace | self removeFace: aFace].
	cLoop asArray do: [:aLoop | self removeLoop: aLoop].
	cEdge asArray do: [:aEdge | self removeEdge: aEdge].
	cVertex asArray do: [:aVertex | self removeVertex: aVertex].
	self addRegion: CADSMNMTOutsideRegion new</body>

<body package="CADSM-NMT" selector="magnifySelf:">magnifySelf: aDouble 
	(self selectFace: [:a | true]) do: [:a | a aSurface magnifySelf: aDouble].
	(self selectEdge: [:a | true]) do: [:a | a aCurve magnifySelf: aDouble].
	(self selectVertex: [:a | a isSpatial]) do: [:a | a magnifySelf: aDouble].
	(self selectFaceUse: [:a | a aSurface isSpatial]) do: 
			[:a | 
			a aSurface magnifySelf: aDouble.
			a glSurface: nil].
	(self selectEdgeUse: [:a | a aCurve isSpatial]) do: 
			[:a | 
			a aCurve magnifySelf: aDouble.
			a glCurve: nil].
	aRefFrame rFfF magnifySelf: aDouble.
	aBoundingBox magnifySelf: aDouble</body>

<body package="CADSM-NMT" selector="privateBuildSolidModel">privateBuildSolidModel
	self clear.
	cFeature do: [:aFeature | aFeature buildIn: self].
	self calcBoundingBox.
	self calcMomentsOfVolume</body>

<body package="CADSM-NMT" selector="unmarkFaceUse">unmarkFaceUse
	cFace do: [:aFace | aFace cUse do: [:aFaceUse | aFaceUse unmark]]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTModel</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aBoundingBox">aBoundingBox
	^aBoundingBox ifNil: 
			[self calcBoundingBox.
			aBoundingBox]</body>

<body package="CADSM-NMT" selector="aBoundingBox:">aBoundingBox: anObject
	aBoundingBox := anObject</body>

<body package="CADSM-NMT" selector="aBoundingBoxF">aBoundingBoxF
	"Model frame is the same as part frame. No transformation needed."

	^self aBoundingBox</body>

<body package="CADSM-NMT" selector="addEdge:">addEdge: aEdge 
	"aSub maybe already in a tree. Make sure aSub is released by its aSup."

	aEdge removeSup.
	cEdge add: aEdge.
	aEdge aSup: self.
	^aEdge</body>

<body package="CADSM-NMT" selector="addFace:">addFace: aFace 
	"aSub maybe already in a tree. Make sure aSub is released by its aSup."

	aFace removeSup.
	cFace add: aFace.
	aFace aSup: self.
	^aFace</body>

<body package="CADSM-NMT" selector="addFeature:">addFeature: aFeature 
	"aSub maybe already in a tree. Make sure aSub is released by its aSup."

	self aRefFrame addSub: aFeature aRefFrame.
	aFeature removeSup.
	cFeature add: aFeature.
	aFeature aSup: self.
	^aFeature</body>

<body package="CADSM-NMT" selector="addLoop:">addLoop: aLoop 
	"aSub maybe already in a tree. Make sure aSub is released by its aSup."

	aLoop removeSup.
	cLoop add: aLoop.
	aLoop aSup: self.
	^aLoop</body>

<body package="CADSM-NMT" selector="addRegion:">addRegion: aRegion 
	"aSub maybe already in a tree. Make sure aSub is released by its aSup."

	aRegion removeSup.
	cRegion add: aRegion.
	aRegion aSup: self.
	^aRegion</body>

<body package="CADSM-NMT" selector="addShell:">addShell: aShell 
	"aSub maybe already in a tree. Make sure aSub is released by its aSup."

	aShell removeSup.
	cShell add: aShell.
	aShell aSup: self.
	^aShell</body>

<body package="CADSM-NMT" selector="addSurface:">addSurface: aSurface 
	aSurface removeSup.
	aRefFrame addSub: aSurface aRefFrame.
	aSurface aSup: self.
	^aSurface</body>

<body package="CADSM-NMT" selector="addVertex:">addVertex: aVertex 
	"aSub maybe already in a tree. Make sure aSub is released by its aSup."

	aVertex removeSup.
	cVertex add: aVertex.
	aVertex aSup: self.
	^aVertex</body>

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

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

<body package="CADSM-NMT" selector="aModel">aModel
	^self</body>

<body package="CADSM-NMT" selector="aOutsideRegion">aOutsideRegion
	^cRegion at: 1</body>

<body package="CADSM-NMT" selector="aRefFrame">aRefFrame
	^aRefFrame</body>

<body package="CADSM-NMT" selector="aRefFrame:">aRefFrame: aaRefFrame 
	aRefFrame := aaRefFrame.
	aRefFrame body: self</body>

<body package="CADSM-NMT" selector="aSketch">aSketch
	^self</body>

<body package="CADSM-NMT" selector="cadObject:">cadObject: cadObject 
	self removeActionsForEvent: #getCADObject.
	cadObject ifNotNil:
			[self 
				when: #getCADObject
				ask: cadObject
				perform: #yourself]</body>

<body package="CADSM-NMT" selector="cFace">cFace
	^cFace</body>

<body package="CADSM-NMT" selector="cFace:">cFace: anObject
	cFace := anObject</body>

<body package="CADSM-NMT" selector="cFeature">cFeature
	^cFeature</body>

<body package="CADSM-NMT" selector="container">container
	^aSup</body>

<body package="CADSM-NMT" selector="cSub">cSub
	^cRegion</body>

<body package="CADSM-NMT" selector="emptySelf">emptySelf
	cRegion asArray do: [:aRegion | self removeSub: aRegion]</body>

<body package="CADSM-NMT" selector="interface">interface
	^aSup interface</body>

<body package="CADSM-NMT" selector="newEdgeWith:and:aCurve:">newEdgeWith: aVertex1 and: aVertex2 aCurve: aCurve 
	| acEdge acVertex aEdge |
	acEdge := self selectEdge: 
					[:aaEdge | 
					acVertex := aaEdge cVertex.
					(acVertex includes: aVertex1) 
						and: [(acVertex includes: aVertex2) and: [aaEdge aCurve = aCurve]]].
	^acEdge size = 0 
		ifTrue: 
			[aEdge := CADSM.NMT.CADSMNMTEdge new.
			aEdge aCurve: aCurve copy.
			self addEdge: aEdge.
			aEdge]
		ifFalse: 
			[acEdge size = 1 
				ifTrue: [acEdge first]
				ifFalse: [self assert: [acEdge size &lt; 2]]]</body>

<body package="CADSM-NMT" selector="newFace">newFace
	| aFace |
	aFace := CADSM.NMT.CADSMNMTFace new.
	self addFace: aFace.
	^aFace</body>

<body package="CADSM-NMT" selector="newFaceWithSurface:">newFaceWithSurface: aaSurface 
	| aFace |
	aFace := CADSM.NMT.CADSMNMTFace new.
	aFace aSurface: aaSurface.
	self addFace: aFace.
	^aFace</body>

<body package="CADSM-NMT" selector="newLoop">newLoop
	| aLoop |
	aLoop := CADSM.NMT.CADSMNMTLoop new.
	self addLoop: aLoop.
	^aLoop</body>

<body package="CADSM-NMT" selector="newRegion">newRegion
	| aRegion |
	aRegion := CADSM.NMT.CADSMNMTRegion new.
	self addRegion: aRegion.
	^aRegion</body>

<body package="CADSM-NMT" selector="newShell">newShell
	| aShell |
	aShell := CADSM.NMT.CADSMNMTShell new.
	self addShell: aShell.
	^aShell</body>

<body package="CADSM-NMT" selector="newVertex:">newVertex: aPoint 
	"A Vertex must be unique in space."

	| aVertex |
	aVertex := cVertex detect: [:aaVertex | aaVertex aPoint = aPoint]
				ifNone: nil.
	^aVertex 
		ifNil: [self addVertex: (CADSM.NMT.CADSMNMTVertex new: aPoint copy)]</body>

<body package="CADSM-NMT" selector="rDfD">rDfD
	^aSup rDfD</body>

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

<body package="CADSM-NMT" selector="removeEdge:">removeEdge: aEdge 
	cEdge remove: aEdge ifAbsent: [nil].
	aEdge aSup: nil.
	^aEdge</body>

<body package="CADSM-NMT" selector="removeFace:">removeFace: aFace 
	cFace remove: aFace ifAbsent: [nil].
	aFace aSup: nil.
	^aFace</body>

<body package="CADSM-NMT" selector="removeGeometry:">removeGeometry: aGeometry 
	aRefFrame removeSub: aGeometry aRefFrame.
	aGeometry aSup: nil.
	^aGeometry</body>

<body package="CADSM-NMT" selector="removeLoop:">removeLoop: aLoop 
	cLoop remove: aLoop ifAbsent: [nil].
	aLoop aSup: nil.
	^aLoop</body>

<body package="CADSM-NMT" selector="removeRegion:">removeRegion: aRegion 
	cRegion remove: aRegion ifAbsent: [nil].
	aRegion aSup: nil.
	^aRegion</body>

<body package="CADSM-NMT" selector="removeShell:">removeShell: aShell 
	cShell remove: aShell ifAbsent: [nil].
	aShell aSup: nil.
	^aShell</body>

<body package="CADSM-NMT" selector="removeSup">removeSup
	self removeDisplayList.
	self aSup ifNotNil: [:aaSup | aaSup removeNMT: self]</body>

<body package="CADSM-NMT" selector="removeVertex:">removeVertex: aVertex 
	cVertex remove: aVertex ifAbsent: [nil].
	aVertex aSup: nil.
	^aVertex</body>

<body package="CADSM-NMT" selector="_aRefFrame:">_aRefFrame: aaRefFrame 
	aRefFrame := aaRefFrame.
	aRefFrame body: self</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTModel</class-id> <category>enumerating</category>

<body package="CADSM-NMT" selector="selectCurve:into:">selectCurve: aBlock into: aSet 
	cEdge do: [:each | each selectCurve: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectEdge:into:">selectEdge: aBlock into: aSet 
	cEdge do: [:each | each selectEdge: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectEdgeUse:into:">selectEdgeUse: aBlock into: aSet 
	cRegion do: [:each | each selectEdgeUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectFace:into:">selectFace: aBlock into: aSet 
	cFace do: [:each | each selectFace: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectFaceUse:into:">selectFaceUse: aBlock into: aSet 
	cRegion do: [:each | each selectFaceUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectLoop:into:">selectLoop: aBlock into: aSet 
	cLoop do: [:each | each selectLoop: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectLoopUse:into:">selectLoopUse: aBlock into: aSet 
	cRegion do: [:each | each selectLoopUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectModel:into:">selectModel: aBlock into: aSet 
	(aBlock value: self) ifTrue: [aSet add: self]</body>

<body package="CADSM-NMT" selector="selectRegion:into:">selectRegion: aBlock into: aSet 
	cRegion do: [:each | each selectRegion: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectShell:into:">selectShell: aBlock into: aSet 
	cShell do: [:each | each selectShell: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectShellUse:into:">selectShellUse: aBlock into: aSet 
	cRegion do: [:each | each selectShellUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectSurface:into:">selectSurface: aBlock into: aSet 
	cFace do: [:each | each selectSurface: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectVertex:into:">selectVertex: aBlock into: aSet 
	cVertex do: [:each | each selectVertex: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectVertexUse:into:">selectVertexUse: aBlock into: aSet 
	cRegion do: [:each | each selectVertexUse: aBlock into: aSet]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTManyUseItem</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="addUse:">addUse: aUse 
	cUse add: aUse.
	aUse aNMTItem: self</body>

<body package="CADSM-NMT" selector="cSub">cSub
	^cUse</body>

<body package="CADSM-NMT" selector="cUse">cUse
	^cUse</body>

<body package="CADSM-NMT" selector="newUse">newUse
	| aItemUse |
	aItemUse := self useClass new.
	self addUse: aItemUse.
	^aItemUse</body>

<body package="CADSM-NMT" selector="removeSub:">removeSub: aSub 
	| answer |
	answer := super removeSub: aSub.
	self cUse isEmpty ifTrue: [self die].
	^answer</body>

<body package="CADSM-NMT" selector="useClass">useClass
	self subclassResponsibility</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTManyUseItem</class-id> <category>initialize-release</category>

<body package="CADSM-NMT" selector="initialize">initialize
	cUse := CADSM.Misc.CADSMMiscOrderedSet new</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTManyUseItem</class-id> <category>comparing</category>

<body package="CADSM-NMT" selector="=">= anObject 
	^self == anObject</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTFace</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aSurface">aSurface
	^aSurface</body>

<body package="CADSM-NMT" selector="aSurface:">aSurface: anObject
	aSurface := anObject</body>

<body package="CADSM-NMT" selector="removeSup">removeSup
	aSup ifNotNil: [:aaSup | aaSup removeFace: self]</body>

<body package="CADSM-NMT" selector="useClass">useClass
	^CADSM.NMT.CADSMNMTFaceUse</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTFace</class-id> <category>printing</category>

<body package="CADSM-NMT" selector="printOn:">printOn: aStream 
	aStream nextPutAll: 'aF'.
	aStream print: (self selectFace: [:item | true]) size.
	aStream nextPutAll: ':L'.
	aStream print: (self selectLoop: [:item | true]) size.
	aStream nextPutAll: ':E'.
	aStream print: (self selectEdge: [:item | true]) size.
	aStream nextPutAll: ':V'.
	aStream print: (self selectVertex: [:item | true]) size.
	aStream nextPutAll: ':FU'.
	aStream print: (self selectFaceUse: [:item | true]) size.
	aStream nextPutAll: ':LU'.
	aStream print: (self selectLoopUse: [:item | true]) size.
	aStream nextPutAll: ':EU'.
	aStream print: (self selectEdgeUse: [:item | true]) size.
	aStream nextPutAll: ':VU'.
	aStream print: (self selectVertexUse: [:item | true]) size</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTFace</class-id> <category>enumerating</category>

<body package="CADSM-NMT" selector="selectEdge:into:">selectEdge: aBlock into: aSet 
	cUse do: [:each | each selectEdge: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectEdgeUse:into:">selectEdgeUse: aBlock into: aSet 
	cUse do: [:each | each selectEdgeUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectFace:into:">selectFace: aBlock into: aSet 
	(aBlock value: self) ifTrue: [aSet add: self]</body>

<body package="CADSM-NMT" selector="selectFaceUse:into:">selectFaceUse: aBlock into: aSet 
	cUse do: [:each | each selectFaceUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectLoop:into:">selectLoop: aBlock into: aSet 
	cUse do: [:each | each selectLoop: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectLoopUse:into:">selectLoopUse: aBlock into: aSet 
	cUse do: [:each | each selectLoopUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectVertex:into:">selectVertex: aBlock into: aSet 
	cUse do: [:each | each selectVertex: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectVertexUse:into:">selectVertexUse: aBlock into: aSet 
	cUse do: [:each | each selectVertexUse: aBlock into: aSet]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTFace</class-id> <category>ops</category>

<body package="CADSM-NMT" selector="startFirstLoopAtVertex:">startFirstLoopAtVertex: aVertex 
	(self selectLoop: [:aLoop | true]) first startLoopAtVertex: aVertex</body>

<body package="CADSM-NMT" selector="startFirstLoopAtVertexUse:">startFirstLoopAtVertexUse: aVertexUse 
	(self selectLoop: [:aLoop | true]) first startLoopAtVertexUse: aVertexUse</body>

<body package="CADSM-NMT" selector="startVertexUseOf:inRegion:">startVertexUseOf: aVertex inRegion: aRegion 
	| aLoopUse cVertexUse |
	aLoopUse := (self 
				selectLoopUse: [:argLoopUse | argLoopUse aRegion == aRegion]) soleItem.
	cVertexUse := aLoopUse 
				selectVertexUse: [:aVertexUse | aVertexUse aVertex == aVertex].
	^cVertexUse size == 1 
		ifTrue: [cVertexUse first]
		ifFalse: [cVertexUse detect: [:aVertexUse | aVertexUse aVertex == aVertex]]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTFace</class-id> <category>As yet unclassified</category>

<body package="CADSM-NMT" selector="selectSurface:into:">selectSurface: aBlock into: aSet 
	cUse do: [:each | each selectSurface: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="txaSurface:">txaSurface: xyzSurface 
	aSurface := xyzSurface.
	cUse do: [:aUse | aUse removeSurface]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTEdge</class-id> <category>printing</category>

<body package="CADSM-NMT" selector="printOn:">printOn: aStream 
	aStream nextPutAll: 'aE:'.
	aStream print: (self selectEdge: [:item | true]) size.
	aStream nextPutAll: ':V'.
	aStream print: (self selectVertex: [:item | true]) size.
	aStream nextPutAll: ':EU'.
	aStream print: (self selectEdgeUse: [:item | true]) size.
	aStream nextPutAll: ':VU'.
	aStream print: (self selectVertexUse: [:item | true]) size</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTEdge</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aCurve">aCurve
	^aCurve</body>

<body package="CADSM-NMT" selector="aCurve:">aCurve: anObject
	aCurve := anObject</body>

<body package="CADSM-NMT" selector="cVertex">cVertex
	| aEdgeUse |
	aEdgeUse := cUse first.
	^CADSM.Misc.CADSMMiscOrderedSet with: aEdgeUse aVertex with: aEdgeUse mate aVertex</body>

<body package="CADSM-NMT" selector="removeSup">removeSup
	aSup ifNotNil: [:aaSup | aaSup removeEdge: self]</body>

<body package="CADSM-NMT" selector="useClass">useClass
	^CADSM.NMT.CADSMNMTEdgeUse</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTEdge</class-id> <category>enumerating</category>

<body package="CADSM-NMT" selector="selectCurve:into:">selectCurve: aBlock into: aSet 
	cUse do: [:each | each selectCurve: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectEdge:into:">selectEdge: aBlock into: aSet 
	(aBlock value: self) ifTrue: [aSet add: self]</body>

<body package="CADSM-NMT" selector="selectEdgeUse:into:">selectEdgeUse: aBlock into: aSet 
	cUse do: [:each | each selectEdgeUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectVertex:into:">selectVertex: aBlock into: aSet 
	cUse do: [:each | each selectVertex: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectVertexUse:into:">selectVertexUse: aBlock into: aSet 
	cUse do: [:each | each selectVertexUse: aBlock into: aSet]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTRegion</class-id> <category>initialize-release</category>

<body package="CADSM-NMT" selector="initialize">initialize
	cShellUse := CADSM.Misc.CADSMMiscOrderedSet new</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTRegion</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="addShellUse:">addShellUse: aShellUse 
	"aSub maybe already in a tree. Make sure aSub is released by its aSup."

	aShellUse removeSup.
	cShellUse add: aShellUse.
	aShellUse aSup: self.
	^aShellUse</body>

<body package="CADSM-NMT" selector="aRegion">aRegion
	^self</body>

<body package="CADSM-NMT" selector="cShellUse">cShellUse
	^cShellUse</body>

<body package="CADSM-NMT" selector="cShellUse:">cShellUse: acShellUse 
	cShellUse := acShellUse</body>

<body package="CADSM-NMT" selector="cSub">cSub
	^cShellUse</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTRegion</class-id> <category>enumerating</category>

<body package="CADSM-NMT" selector="selectEdge:into:">selectEdge: aBlock into: aSet 
	cShellUse do: [:each | each selectEdge: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectEdgeUse:into:">selectEdgeUse: aBlock into: aSet 
	cShellUse do: [:each | each selectEdgeUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectFace:into:">selectFace: aBlock into: aSet 
	cShellUse do: [:each | each selectFace: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectFaceUse:into:">selectFaceUse: aBlock into: aSet 
	cShellUse do: [:each | each selectFaceUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectLoop:into:">selectLoop: aBlock into: aSet 
	cShellUse do: [:each | each selectLoop: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectLoopUse:into:">selectLoopUse: aBlock into: aSet 
	cShellUse do: [:each | each selectLoopUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectRegion:into:">selectRegion: aBlock into: aSet 
	(aBlock value: self) ifTrue: [aSet add: self]</body>

<body package="CADSM-NMT" selector="selectShell:into:">selectShell: aBlock into: aSet 
	cShellUse do: [:each | each selectShell: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectShellUse:into:">selectShellUse: aBlock into: aSet 
	cShellUse do: [:each | each selectShellUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectVertex:into:">selectVertex: aBlock into: aSet 
	cShellUse do: [:each | each selectVertex: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectVertexUse:into:">selectVertexUse: aBlock into: aSet 
	cShellUse do: [:each | each selectVertexUse: aBlock into: aSet]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTRegion</class-id> <category>printing</category>

<body package="CADSM-NMT" selector="printOn:">printOn: aStream 
	aStream nextPutAll: 'aR'.
	aStream print: (self selectRegion: [:item | true]) size.
	aStream nextPutAll: ':S'.
	aStream print: (self selectShell: [:item | true]) size.
	aStream nextPutAll: ':F'.
	aStream print: (self selectFace: [:item | true]) size.
	aStream nextPutAll: ':L'.
	aStream print: (self selectLoop: [:item | true]) size.
	aStream nextPutAll: ':E'.
	aStream print: (self selectEdge: [:item | true]) size.
	aStream nextPutAll: ':V'.
	aStream print: (self selectVertex: [:item | true]) size.
	aStream nextPutAll: ':FU'.
	aStream print: (self selectFaceUse: [:item | true]) size.
	aStream nextPutAll: ':LU'.
	aStream print: (self selectLoopUse: [:item | true]) size.
	aStream nextPutAll: ':EU'.
	aStream print: (self selectEdgeUse: [:item | true]) size.
	aStream nextPutAll: ':VU'.
	aStream print: (self selectVertexUse: [:item | true]) size</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTRegion</class-id> <category>displaying</category>

<body package="CADSM-NMT" selector="renderOn:">renderOn: aRenderingContext 
	cShellUse do: [:aShell | aShell renderOn: aRenderingContext]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTLoop</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="removeSup">removeSup
	aSup ifNotNil: [:aaSup | aaSup removeLoop: self]</body>

<body package="CADSM-NMT" selector="useClass">useClass
	^CADSM.NMT.CADSMNMTLoopUse</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTLoop</class-id> <category>enumerating</category>

<body package="CADSM-NMT" selector="selectEdge:into:">selectEdge: aBlock into: aSet 
	cUse do: [:each | each selectEdge: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectEdgeUse:into:">selectEdgeUse: aBlock into: aSet 
	cUse do: [:each | each selectEdgeUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectLoop:into:">selectLoop: aBlock into: aSet 
	(aBlock value: self) ifTrue: [aSet add: self]</body>

<body package="CADSM-NMT" selector="selectLoopUse:into:">selectLoopUse: aBlock into: aSet 
	cUse do: [:each | each selectLoopUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectVertex:into:">selectVertex: aBlock into: aSet 
	cUse do: [:each | each selectVertex: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectVertexUse:into:">selectVertexUse: aBlock into: aSet 
	cUse do: [:each | each selectVertexUse: aBlock into: aSet]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTLoop</class-id> <category>printing</category>

<body package="CADSM-NMT" selector="printOn:">printOn: aStream 
	aStream nextPutAll: 'aL'.
	aStream print: (self selectLoop: [:item | true]) size.
	aStream nextPutAll: ':E'.
	aStream print: (self selectEdge: [:item | true]) size.
	aStream nextPutAll: ':V'.
	aStream print: (self selectVertex: [:item | true]) size.
	aStream nextPutAll: ':LU'.
	aStream print: (self selectLoopUse: [:item | true]) size.
	aStream nextPutAll: ':EU'.
	aStream print: (self selectEdgeUse: [:item | true]) size.
	aStream nextPutAll: ':VU'.
	aStream print: (self selectVertexUse: [:item | true]) size</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTLoop</class-id> <category>As yet unclassified</category>

<body package="CADSM-NMT" selector="startLoopAtVertex:">startLoopAtVertex: argVertex 
	cUse do: [:aLoopUse | aLoopUse startLoopAtVertex: argVertex]</body>

<body package="CADSM-NMT" selector="startLoopAtVertexUse:">startLoopAtVertexUse: argVertexUse 
	| aLoopUse mateargVertexUse |
	aLoopUse := (self 
				selectLoopUse: [:argLoopUse | argLoopUse includesVertexUse: argVertexUse]) 
					soleItem.
	aLoopUse startLoopAtVertexUse: argVertexUse.
	mateargVertexUse := aLoopUse cEdgeUse last mate aVertexUse.
	aLoopUse := (self 
				selectLoopUse: [:argLoopUse | argLoopUse includesVertexUse: mateargVertexUse]) 
					soleItem.
	aLoopUse startLoopAtVertexUse: mateargVertexUse</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTAnyOperator</class-id> <category>executing</category>

<body package="CADSM-NMT" selector="do">do
	self preExecute.
	self execute.
	self postExecute</body>

<body package="CADSM-NMT" selector="postcondition">postcondition
	^true</body>

<body package="CADSM-NMT" selector="postExecute">postExecute
	self postcondition ifFalse: [self error: 'Invalid operation']</body>

<body package="CADSM-NMT" selector="precondition">precondition
	^true</body>

<body package="CADSM-NMT" selector="preExecute">preExecute
	self precondition ifFalse: [self error: 'Precondition not met']</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTCompositeOperator</class-id> <category>initialize-release</category>

<body package="CADSM-NMT" selector="initialize">initialize
	cOperator := OrderedCollection new</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakePrism</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aSketchFaceUse">aSketchFaceUse
	^aSketchFaceUse</body>

<body package="CADSM-NMT" selector="aSketchFaceUse:">aSketchFaceUse: anObject
	aSketchFaceUse := anObject</body>

<body package="CADSM-NMT" selector="cOperator">cOperator
	^cOperator</body>

<body package="CADSM-NMT" selector="cOperator:">cOperator: anObject
	cOperator := anObject</body>

<body package="CADSM-NMT" selector="newModel">newModel
	^newModel</body>

<body package="CADSM-NMT" selector="newModel:">newModel: anObject
	newModel := anObject</body>

<body package="CADSM-NMT" selector="outsideTopFaceUse">outsideTopFaceUse
	^(newTopFace 
		selectFaceUse: [:aFaceUse | aFaceUse aRegion == aOutsideRegion]) soleItem</body>

<body package="CADSM-NMT" selector="zEnd">zEnd
	^zEnd</body>

<body package="CADSM-NMT" selector="zEnd:">zEnd: anObject
	zEnd := anObject</body>

<body package="CADSM-NMT" selector="zStart">zStart
	^zStart</body>

<body package="CADSM-NMT" selector="zStart:">zStart: anObject
	zStart := anObject</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakePrism</class-id> <category>executing</category>

<body package="CADSM-NMT" selector="addcSideLineWithcEdgeUse1:">addcSideLineWithcEdgeUse1: cEdgeUse 
	"Code below applies to face with single loop only."

	"Multiple loop face is not yet inplemented."

	| aSketchRefFrame firstEdgeUse rSkoriginSk rSkxPointSk xLength yLength aRectangle crfpointf |
	aSketchRefFrame := aSketchFaceUse aSketchRefFrame.
	firstEdgeUse := cEdgeUse first.
	rSkoriginSk := firstEdgeUse aStartPoint.
	rSkxPointSk := firstEdgeUse aEndPoint.
	xLength := (rSkxPointSk - rSkoriginSk) length.
	yLength := zEnd - zStart.
	aRectangle := CADSM.Geo.CADSMGeoRectangle xLength: xLength yLength: yLength.
	crfpointf := aRectangle rfpointsf.
	1 to: 4
		do: 
			[:i | 
			| uvOFt |
			uvOFt := CADSMGeoLine new.
			aSketchRefFrame addSub: uvOFt aRefFrame.
			uvOFt rfstartf: (crfpointf at: i) copy.
			uvOFt rfendf: (crfpointf at: i + 1) copy.
			uvOFt calc.
			uvOFt privateCalcBoundingBox.
			(cEdgeUse at: i) addPositiveCurve: uvOFt]</body>

<body package="CADSM-NMT" selector="addcSideLineWithcEdgeUse:">addcSideLineWithcEdgeUse: cEdgeUse 
	"Code below applies to face with single loop only."

	"Multiple loop face is not yet inplemented."

	| aRectangle crfpointf |
	aRectangle := CADSM.Geo.CADSMGeoRectangle xLength: 1.0d yLength: 1.0d.
	crfpointf := aRectangle rfpointsf.
	1 to: 4
		do: 
			[:i | 
			| uvOFt |
			uvOFt := CADSMGeoLine new.
			uvOFt rfstartf: (crfpointf at: i) copy.
			uvOFt rfendf: (crfpointf at: i + 1) copy.
			(cEdgeUse at: i) addPositiveCurve: uvOFt]</body>

<body package="CADSM-NMT" selector="addFaceGeometry">addFaceGeometry
	self addSideFaceGeometry.
	self modifyTopFaceGeometry</body>

<body package="CADSM-NMT" selector="addSideFaceGeometry">addSideFaceGeometry
	| outsideNewSideFaceUse firstLoopUse cEdgeUse firstEdgeUse |
	cNewSideFace do: 
			[:aNewSideFace | 
			outsideNewSideFaceUse := (aNewSideFace 
						selectFaceUse: [:aFaceUse | aFaceUse aRegion == aOutsideRegion]) soleItem.
			firstLoopUse := outsideNewSideFaceUse cLoopUse first.
			cEdgeUse := firstLoopUse cEdgeUse.
			firstEdgeUse := cEdgeUse first.
			self addSweepWithEdgeUse: firstEdgeUse.
			self addcSideLineWithcEdgeUse: cEdgeUse]</body>

<body package="CADSM-NMT" selector="addSideFaceGeometry1">addSideFaceGeometry1
	| aSketchRefFrame outsideNewSideFaceUse firstLoopUse cEdgeUse firstEdgeUse firstCurve aRectSurface aRectSurfaceRefFrame rSkoriginSk rSkxPointSk rSkyPointSk origin corner uvOFt |
	aSketchRefFrame := aSketchFaceUse aSketchRefFrame.
	cNewSideFace do: 
			[:aNewSideFace | 
			outsideNewSideFaceUse := (aNewSideFace 
						selectFaceUse: [:aFaceUse | aFaceUse aRegion == aOutsideRegion]) soleItem.
			firstLoopUse := outsideNewSideFaceUse cLoopUse first.
			cEdgeUse := firstLoopUse cEdgeUse.
			firstEdgeUse := cEdgeUse first.
			firstCurve := firstEdgeUse xyzOFu.
			(firstCurve isMemberOf: CADSMGeoLine) 
				ifTrue: 
					[aRectSurface := CADSMGeoRectSurface new.
					aRectSurfaceRefFrame := aRectSurface aRefFrame.
					aSketchRefFrame addSub: aRectSurfaceRefFrame.
					rSkoriginSk := firstEdgeUse aStartPoint.
					rSkxPointSk := firstEdgeUse aEndPoint.
					rSkyPointSk := (rSkoriginSk copy)
								at: 3 put: zEnd - zStart;
								yourself.
					aRectSurfaceRefFrame 
						rFfF: rSkoriginSk
						xPoint: rSkxPointSk
						yPoint: rSkyPointSk.
					origin := StMFullColumn zero: 3.
					corner := StMFullColumn 
								with: (rSkxPointSk - rSkoriginSk) length
								with: zEnd - zStart
								with: 0.0d.
					aRectSurface aBoundingBox: (CADSMMiscBoundingBox origin: origin corner: corner).
					outsideNewSideFaceUse addPositiveSurface: aRectSurface.
					"Code below applies to face with single loop only."
					"Multiple loop face is not yet inplemented."
					uvOFt := CADSMGeoLine new.
					aSketchRefFrame addSub: uvOFt aRefFrame.
					uvOFt rfstartf: (StMFullColumn zero: 2).
					uvOFt 
						rfendf: (StMFullColumn with: (rSkxPointSk - rSkoriginSk) length with: 0.0d).
					uvOFt calc.
					uvOFt privateCalcBoundingBox.
					firstEdgeUse addPositiveCurve: uvOFt]
				ifFalse: [(firstCurve isMemberOf: EllipticalArc) ifTrue: []]]</body>

<body package="CADSM-NMT" selector="addSideFaceGeometry2">addSideFaceGeometry2
	| outsideNewSideFaceUse firstLoopUse cEdgeUse firstEdgeUse firstCurve |
	cNewSideFace do: 
			[:aNewSideFace | 
			outsideNewSideFaceUse := (aNewSideFace 
						selectFaceUse: [:aFaceUse | aFaceUse aRegion == aOutsideRegion]) soleItem.
			firstLoopUse := outsideNewSideFaceUse cLoopUse first.
			cEdgeUse := firstLoopUse cEdgeUse.
			firstEdgeUse := cEdgeUse first.
			firstCurve := firstEdgeUse xyzOFu.
			(firstCurve isMemberOf: CADSMGeoLine) 
				ifTrue: 
					[self addSideRectSurfaceWithEdgeUse: firstEdgeUse.
					self addcSideLineWithcEdgeUse: cEdgeUse]
				ifFalse: 
					[(firstCurve isMemberOf: CADSMGeoEllipticArc) ifTrue: [self notYetImplemented]]]</body>

<body package="CADSM-NMT" selector="addSideRectSurfaceWithEdgeUse:">addSideRectSurfaceWithEdgeUse: aEdgeUse 
	| aRectSurface rSkoriginSk rSkxPointSk rSkyPointSk origin corner |
	aRectSurface := CADSMGeoRectSurface new.
	aSketchFaceUse aSketch addSurface: aRectSurface.
	rSkoriginSk := aEdgeUse aStartPoint.
	rSkxPointSk := aEdgeUse aEndPoint.
	rSkyPointSk := (rSkoriginSk copy)
				at: 3 put: zEnd - zStart;
				yourself.
	aRectSurface aRefFrame 
		rFfF: rSkoriginSk
		xPoint: rSkxPointSk
		yPoint: rSkyPointSk.
	origin := StMFullColumn zero: 3.
	corner := StMFullColumn 
				with: (rSkxPointSk - rSkoriginSk) length
				with: zEnd - zStart
				with: 0.0d.
	aRectSurface aBoundingBox: (CADSMMiscBoundingBox origin: origin corner: corner).
	aEdgeUse aFaceUse addPositiveSurface: aRectSurface</body>

<body package="CADSM-NMT" selector="addSweepWithEdgeUse:">addSweepWithEdgeUse: aEdgeUse 
	| aSweep aSketch trajectory |
	aSweep := CADSMGeoSweep new.
	aSketch := aSketchFaceUse aSketch.
	aSketch addSurface: aSweep.
	aSweep _aCurve: aEdgeUse aCurve copy.
	trajectory := (CADSMGeoLine new)
				rfstartf: (StMFullColumn 
							with: 0.0d
							with: 0.0d
							with: zStart);
				rfendf: (StMFullColumn 
							with: 0.0d
							with: 0.0d
							with: zEnd);
				calc;
				privateCalcBoundingBox;
				yourself.
	aSweep _trajectory: trajectory.
	aSweep calc.
	aSweep privateCalcBoundingBox.
	aEdgeUse aFaceUse addPositiveSurface: aSweep</body>

<body package="CADSM-NMT" selector="execute">execute
	| bottomSketchFaceUse aMakeThinSolid |
	bottomSketchFaceUse := aSketchFaceUse copy.
	bottomSketchFaceUse aSurface aRefFrame rFfF at: 3 put: zStart.
	aMakeThinSolid := CADSMNMTMakeThinSolid aSketchFaceUse: bottomSketchFaceUse.
	aMakeThinSolid do.
	newModel := aMakeThinSolid newModel.
	aOutsideRegion := newModel aOutsideRegion.
	newTopFace := aMakeThinSolid newTopFace.
	newBottomFace := aMakeThinSolid newBottomFace.
	cOperator add: aMakeThinSolid.
	self extrude</body>

<body package="CADSM-NMT" selector="extrude">extrude
	| nLoop |
	nLoop := aSketchFaceUse cLoopUse size.
	self extrudeFirstLoop.
	2 to: nLoop do: [:i | self extrudeLoop: i]</body>

<body package="CADSM-NMT" selector="extrudeFirstLoop">extrudeFirstLoop
	(aSketchFaceUse cLoopUse at: 1) isSelfLoop 
		ifTrue: [self extrudeFirstSelfLoop]
		ifFalse: [self extrudeFirstNormalLoop]</body>

<body package="CADSM-NMT" selector="extrudeFirstNormalLoop">extrudeFirstNormalLoop
	| topSketchFaceUse firstLoopUse cTopPoint nPoint oldFaceUse oldLoopUse cVertex cTopVertex cUpEdge aMMakeEV1 aMMakeEV2 aMMakeEFL aNewSideFace |
	topSketchFaceUse := aSketchFaceUse copy.
	topSketchFaceUse aSurface aRefFrame rFfF at: 3 put: zEnd.
	firstLoopUse := topSketchFaceUse cLoopUse at: 1.
	cTopPoint := firstLoopUse cEdgeUse 
				collect: [:aEdgeUse | aEdgeUse aVertexUse rSkFacePointSk].
	nPoint := cTopPoint size.
	oldFaceUse := (newTopFace 
				selectFaceUse: [:argaFaceUse | argaFaceUse aRegion == aOutsideRegion]) 
					soleItem.
	oldLoopUse := (oldFaceUse selectLoopUse: [:aLoopUse | true]) soleItem.
	cVertex := oldLoopUse selectVertex: [:aVertex | true].
	cTopVertex := cVertex copyEmpty.
	cUpEdge := cVertex copyEmpty.
	cNewSideFace := CADSM.Misc.CADSMMiscOrderedSet new.

	"Make up edge."
	aMMakeEV1 := CADSMNMTMMakeEV 
				inRegion: aOutsideRegion
				inFace: newTopFace
				aEdge: nil
				fromVertex: (cVertex at: 2)
				toPoint: (cTopPoint at: 2)
				orient: nil.
	cOperator add: aMMakeEV1 do.
	cTopVertex add: aMMakeEV1 newVertex.
	cUpEdge add: aMMakeEV1 newEdge.

	"Make top level edge."
	aMMakeEV2 := CADSMNMTMMakeEV 
				inRegion: aOutsideRegion
				inFace: newTopFace
				aEdge: nil
				fromVertex: aMMakeEV1 newVertex
				toPoint: (cTopPoint at: 1)
				orient: nil.
	cOperator add: aMMakeEV2 do.
	cTopVertex addFirst: aMMakeEV2 newVertex.

	"Make down edge to create a new face."
	aMMakeEFL := CADSMNMTMMakeE 
				inRegion: aOutsideRegion
				inFace: newTopFace
				aEdge: aMMakeEV2 newEdge
				aVertex: aMMakeEV2 newVertex
				orient: nil
				aEdge: (oldLoopUse aEdgeAt: 1)
				aVertex: (cVertex at: 1)
				orient: nil.
	cOperator add: aMMakeEFL do.
	cUpEdge addFirst: aMMakeEFL newEdge.
	aNewSideFace := aMMakeEFL newFace.
	aNewSideFace startFirstLoopAtVertex: (cVertex at: 1).
	cNewSideFace add: aNewSideFace.
	2 to: nPoint - 1
		do: 
			[:i | 
			"Make up edge."

			aMMakeEV1 := CADSMNMTMMakeEV 
						inRegion: aOutsideRegion
						inFace: newTopFace
						aEdge: nil
						fromVertex: (cVertex at: i + 1)
						toPoint: (cTopPoint at: i + 1)
						orient: nil.
			cOperator add: aMMakeEV1 do.
			cTopVertex add: aMMakeEV1 newVertex.
			cUpEdge add: aMMakeEV1 newEdge.

			"Make top level edge to create a new face."
			aMMakeEFL := CADSMNMTMMakeE 
						inRegion: aOutsideRegion
						inFace: newTopFace
						aEdge: (cUpEdge at: i + 1)
						aVertex: (cTopVertex at: i + 1)
						orient: nil
						aEdge: (cUpEdge at: i)
						aVertex: (cTopVertex at: i)
						orient: nil.
			cOperator add: aMMakeEFL do.
			aNewSideFace := aMMakeEFL newFace.
			aNewSideFace startFirstLoopAtVertex: (cVertex at: i).
			cNewSideFace add: aNewSideFace].

	"Make top level edge to create the last new face."
	aMMakeEFL := CADSMNMTMMakeE 
				inRegion: aOutsideRegion
				inFace: newTopFace
				aEdge: (cUpEdge at: 1)
				aVertex: (cTopVertex at: 1)
				orient: nil
				aEdge: (cUpEdge at: nPoint)
				aVertex: (cTopVertex at: nPoint)
				orient: nil.
	cOperator add: aMMakeEFL do.
	aNewSideFace := aMMakeEFL newFace.
	aNewSideFace startFirstLoopAtVertex: (cVertex at: nPoint).
	cNewSideFace add: aNewSideFace.
	newTopFace startFirstLoopAtVertex: (cTopVertex at: 1).
	self addFaceGeometry</body>

<body package="CADSM-NMT" selector="extrudeFirstSelfLoop">extrudeFirstSelfLoop
	| topSketchFaceUse firstLoopUse cTopPoint oldFaceUse oldLoopUse cVertex cTopVertex cUpEdge aMMakeEV1 aMMakeEFL aNewSideFace startVertexUse |
	topSketchFaceUse := aSketchFaceUse copy.
	topSketchFaceUse aSurface aRefFrame rFfF at: 3 put: zEnd.
	firstLoopUse := topSketchFaceUse cLoopUse at: 1.
	cTopPoint := firstLoopUse cEdgeUse 
				collect: [:aEdgeUse | aEdgeUse aVertexUse rSkFacePointSk].
	oldFaceUse := (newTopFace 
				selectFaceUse: [:argaFaceUse | argaFaceUse aRegion == aOutsideRegion]) 
					soleItem.
	oldLoopUse := (oldFaceUse selectLoopUse: [:aLoopUse | true]) soleItem.
	cVertex := oldLoopUse selectVertex: [:aVertex | true].
	cTopVertex := cVertex copyEmpty.
	cUpEdge := cVertex copyEmpty.
	cNewSideFace := CADSM.Misc.CADSMMiscOrderedSet new.

	"Make up edge."
	aMMakeEV1 := CADSMNMTMMakeEV 
				inRegion: aOutsideRegion
				inFace: newTopFace
				aEdge: nil
				fromVertex: (cVertex at: 1)
				toPoint: (cTopPoint at: 1)
				orient: nil.
	cOperator add: aMMakeEV1 do.
	cTopVertex add: aMMakeEV1 newVertex.
	cUpEdge add: aMMakeEV1 newEdge.

	"Make top edge to create a new face."
	aMMakeEFL := CADSMNMTMMakeE 
				inRegion: aOutsideRegion
				inFace: newTopFace
				aEdge: (cUpEdge at: 1)
				aVertex: (cTopVertex at: 1)
				orient: nil
				aEdge: (cUpEdge at: 1)
				aVertex: (cTopVertex at: 1)
				orient: nil.
	cOperator add: aMMakeEFL do.
	aNewSideFace := aMMakeEFL newFace.
	startVertexUse := aNewSideFace startVertexUseOf: (cVertex at: 1)
				inRegion: aOutsideRegion.
	aNewSideFace startFirstLoopAtVertexUse: startVertexUse.
	cNewSideFace add: aNewSideFace.
	startVertexUse := newTopFace startVertexUseOf: (cTopVertex at: 1)
				inRegion: aOutsideRegion.
	newTopFace startFirstLoopAtVertexUse: startVertexUse.
	self addFaceGeometry</body>

<body package="CADSM-NMT" selector="modifyTopFaceGeometry">modifyTopFaceGeometry
	| topSketchFaceUse outsideTopFaceUse aSurface firstLoopUse cEdgeUse firstSketchLoopUse cSketchEdgeUse |
	topSketchFaceUse := aSketchFaceUse copy.
	topSketchFaceUse aSurface aRefFrame rFfF at: 3 put: zEnd.
	aOutsideRegion := newModel aOutsideRegion.
	outsideTopFaceUse := (newTopFace 
				selectFaceUse: [:aFaceUse | aFaceUse aRegion == aOutsideRegion]) soleItem.
	aSurface := topSketchFaceUse aSurface.
	aSurface name: #top.
	outsideTopFaceUse addPositiveSurface: aSurface.
	"Code below applies to face with single loop only."
	"Multiple loop face is not yet inplemented."
	firstLoopUse := outsideTopFaceUse cLoopUse first.
	cEdgeUse := firstLoopUse cEdgeUse.
	firstSketchLoopUse := topSketchFaceUse cLoopUse first.
	cSketchEdgeUse := firstSketchLoopUse cEdgeUse.
	1 to: cEdgeUse size
		do: [:i | (cEdgeUse at: i) addPositiveCurve: (cSketchEdgeUse at: i) uvOFt copy]</body>

<body package="CADSM-NMT" selector="precondition">precondition
	^zStart &lt;= zEnd</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeThinSolid1</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="cPoint">cPoint
	^cPoint</body>

<body package="CADSM-NMT" selector="cPoint:">cPoint: anObject
	cPoint := anObject</body>

<body package="CADSM-NMT" selector="newBottomFace">newBottomFace
	^newBottomFace</body>

<body package="CADSM-NMT" selector="newBottomFace:">newBottomFace: anObject
	newBottomFace := anObject</body>

<body package="CADSM-NMT" selector="newModel">newModel
	^newModel</body>

<body package="CADSM-NMT" selector="newModel:">newModel: anObject
	newModel := anObject</body>

<body package="CADSM-NMT" selector="newTopFace">newTopFace
	^newTopFace</body>

<body package="CADSM-NMT" selector="newTopFace:">newTopFace: anObject
	newTopFace := anObject</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeThinSolid1</class-id> <category>executing</category>

<body package="CADSM-NMT" selector="execute">execute
	| nPoint aOutsideRegion aMakeSV aVertex1 aMakeRSFL aFace1 fromVertex indexOfFirstMMakeEV aMMakeEV aMMakeEFL |
	nPoint := cPoint size - 1.	"Since first and last points are indentical."
	aOutsideRegion := newModel aOutsideRegion.
	aMakeSV := CADSMNMTMakeSV inRegion: aOutsideRegion aPoint: (cPoint at: 1).
	cOperator add: aMakeSV do.
	aVertex1 := aMakeSV newVertex.
	aMakeRSFL := CADSMNMTMakeRSFL inRegion: aOutsideRegion aVertex: aVertex1.
	cOperator add: aMakeRSFL do.
	aFace1 := aMakeRSFL newFace.
	fromVertex := aVertex1.
	indexOfFirstMMakeEV := cOperator size + 1.
	1 to: nPoint - 1
		do: 
			[:i | 
			aMMakeEV := CADSMNMTMMakeEV 
						inRegion: aOutsideRegion
						inFace: aFace1
						aEdge: nil
						fromVertex: fromVertex
						toPoint: (cPoint at: i + 1)
						orient: nil.
			cOperator add: aMMakeEV do.
			fromVertex := aMMakeEV newVertex].
	aMMakeEFL := CADSMNMTMMakeE 
				inRegion: aOutsideRegion
				inFace: aFace1
				aEdge: cOperator last newEdge
				aVertex: fromVertex
				orient: nil
				aEdge: (cOperator at: indexOfFirstMMakeEV) newEdge
				aVertex: aVertex1
				orient: nil.
	cOperator add: aMMakeEFL do.
	newTopFace := aMMakeEFL newFace.
	newBottomFace := aMMakeEFL aFace</body>

<body package="CADSM-NMT" selector="precondition">precondition
	"cPoint must make a closed loop."

	^cPoint first = cPoint last</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeThinSolid1</class-id> <category>initialize-release</category>

<body package="CADSM-NMT" selector="initialize">initialize
	super initialize.
	newModel := CADSM.NMT.CADSMNMTModel new</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeThinSolid1 class</class-id> <category>instance creation</category>

<body package="CADSM-NMT" selector="cPoint:">cPoint: crPPointP 
	| aMakeThinSolid1 |
	aMakeThinSolid1 := self new.
	aMakeThinSolid1 cPoint: crPPointP.
	^aMakeThinSolid1</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeThinSolid</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aSketchFaceUse">aSketchFaceUse
	^aSketchFaceUse</body>

<body package="CADSM-NMT" selector="aSketchFaceUse:">aSketchFaceUse: anObject
	aSketchFaceUse := anObject</body>

<body package="CADSM-NMT" selector="newBottomFace">newBottomFace
	^newBottomFace</body>

<body package="CADSM-NMT" selector="newBottomFace:">newBottomFace: anObject
	newBottomFace := anObject</body>

<body package="CADSM-NMT" selector="newModel">newModel
	^newModel</body>

<body package="CADSM-NMT" selector="newModel:">newModel: anObject
	newModel := anObject</body>

<body package="CADSM-NMT" selector="newTopFace">newTopFace
	^newTopFace</body>

<body package="CADSM-NMT" selector="newTopFace:">newTopFace: anObject
	newTopFace := anObject</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeThinSolid</class-id> <category>initialize-release</category>

<body package="CADSM-NMT" selector="initialize">initialize
	super initialize.
	newModel := CADSM.NMT.CADSMNMTModel new</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeThinSolid</class-id> <category>executing</category>

<body package="CADSM-NMT" selector="addBottomFaceGeometry">addBottomFaceGeometry
	| aOutsideRegion insideBottomFaceUse |
	aOutsideRegion := newModel aOutsideRegion.
	insideBottomFaceUse := (newBottomFace 
				selectFaceUse: [:aFaceUse | aFaceUse aRegion ~= aOutsideRegion]) soleItem.
	self addGeometryToPositiveFaceUse: insideBottomFaceUse.
	insideBottomFaceUse aSurface name: #bottom</body>

<body package="CADSM-NMT" selector="addBottomFaceUseGeometry">addBottomFaceUseGeometry
	| aOutsideRegion outsideBottomFaceUse |
	aOutsideRegion := newModel aOutsideRegion.
	outsideBottomFaceUse := (newBottomFace 
				selectFaceUse: [:aFaceUse | aFaceUse aRegion == aOutsideRegion]) soleItem.
	self addGeometryToPositiveFaceUse: outsideBottomFaceUse mate</body>

<body package="CADSM-NMT" selector="addFaceGeometry1">addFaceGeometry1
	| aRectSurface aRectSurfaceRefFrame aBoundingBox firstLoopUse |
	aRectSurface := CADSMGeoRectSurface new.
	aRectSurfaceRefFrame := aRectSurface aRefFrame.
	aSketchFaceUse aSketchRefFrame addSub: aRectSurfaceRefFrame.
	aBoundingBox := aRectSurface aBoundingBox.
	firstLoopUse := aSketchFaceUse cLoopUse at: 1.
	firstLoopUse cEdgeUse 
		do: [:aEdgeUse | aBoundingBox expandToBound: aEdgeUse xyzOFu aBoundingBoxF].
	aRectSurfaceRefFrame rFfF at: 3 put: (aBoundingBox minCorner at: 3).
	aBoundingBox zeroZcoord.
	newTopFace aSurface: aRectSurface.
	newBottomFace aSurface: aRectSurface copy.
	self addTopFaceUseGeometry.
	self addBottomFaceUseGeometry</body>

<body package="CADSM-NMT" selector="addGeometryToPositiveFaceUse1:">addGeometryToPositiveFaceUse1: positiveFaceUse 
	"The edgeuses in positiveFaceUse matches the ordering in cEdgeUse."

	| negativeFaceUse positivecEdgeUse aEdgeUse positiveEdgeUse negativeEdgeUse firstLoopUse cEdgeUse |
	negativeFaceUse := positiveFaceUse mate.
	positiveFaceUse isSameSense: true.
	negativeFaceUse isSameSense: false.
	"Code below applies to face with single loop only."
	"Multiple loop face is not yet inplemented."
	positivecEdgeUse := positiveFaceUse cLoopUse first cItemUse.
	firstLoopUse := aSketchFaceUse cLoopUse at: 1.
	cEdgeUse := firstLoopUse cEdgeUse.
	1 to: cEdgeUse size
		do: 
			[:i | 
			aEdgeUse := cEdgeUse at: i.
			positiveEdgeUse := positivecEdgeUse at: i.
			negativeEdgeUse := positiveEdgeUse mate.
			positiveEdgeUse isSameSense: aEdgeUse isSameSense.
			negativeEdgeUse isSameSense: aEdgeUse isSameSense not.
			positiveEdgeUse uvOFt: aEdgeUse uvOFt.
			negativeEdgeUse uvOFt: aEdgeUse uvOFt]</body>

<body package="CADSM-NMT" selector="addGeometryToPositiveFaceUse:">addGeometryToPositiveFaceUse: positiveFaceUse 
	"The geometry in positiveFaceUse is made to match those in sketchFaceUse."

	| aSketch aSurface firstLoopUse cEdgeUse firstSketchLoopUse cSketchEdgeUse |
	aSketch := aSketchFaceUse aSketch.
	aSurface := aSketchFaceUse aSurface copy.
	aSketch addSurface: aSurface.
	positiveFaceUse addPositiveSurface: aSurface.
	"Code below applies to face with single loop only."
	"Multiple loop face is not yet inplemented."
	firstLoopUse := positiveFaceUse cLoopUse first.
	cEdgeUse := firstLoopUse cEdgeUse.
	firstSketchLoopUse := aSketchFaceUse cLoopUse first.
	cSketchEdgeUse := firstSketchLoopUse cEdgeUse.
	1 to: cEdgeUse size
		do: [:i | (cEdgeUse at: i) addPositiveCurve: (cSketchEdgeUse at: i) uvOFt copy]</body>

<body package="CADSM-NMT" selector="addTopFaceGeometry">addTopFaceGeometry
	| aOutsideRegion outsideTopFaceUse |
	aOutsideRegion := newModel aOutsideRegion.
	outsideTopFaceUse := (newTopFace 
				selectFaceUse: [:aFaceUse | aFaceUse aRegion == aOutsideRegion]) soleItem.
	self addGeometryToPositiveFaceUse: outsideTopFaceUse.
	outsideTopFaceUse aSurface name: #top</body>

<body package="CADSM-NMT" selector="addTopFaceUseGeometry">addTopFaceUseGeometry
	| aOutsideRegion outsideTopFaceUse |
	aOutsideRegion := newModel aOutsideRegion.
	outsideTopFaceUse := (newTopFace 
				selectFaceUse: [:aFaceUse | aFaceUse aRegion == aOutsideRegion]) soleItem.
	self addGeometryToPositiveFaceUse: outsideTopFaceUse</body>

<body package="CADSM-NMT" selector="execute">execute
	| nLoop |
	nLoop := aSketchFaceUse cLoopUse size.
	self executeFirstLoop.
	2 to: nLoop do: [:i | self executeLoop: i]</body>

<body package="CADSM-NMT" selector="execute2">execute2
	| crSkVertexSk nPoint aOutsideRegion aMakeSV aVertex1 aMakeRSFL aFace1 fromVertex indexOfFirstMMakeEV aMMakeEV aMMakeEFL |
	crSkVertexSk := aSketchFaceUse crSkVertexSk.
	nPoint := crSkVertexSk size.
	aOutsideRegion := newModel aOutsideRegion.
	aMakeSV := CADSMNMTMakeSV inRegion: aOutsideRegion
				aPoint: (crSkVertexSk at: 1) rSkPointSk.
	cOperator add: aMakeSV do.
	aVertex1 := aMakeSV newVertex.
	aMakeRSFL := CADSMNMTMakeRSFL inRegion: aOutsideRegion aVertex: aVertex1.
	cOperator add: aMakeRSFL do.
	aFace1 := aMakeRSFL newFace.
	fromVertex := aVertex1.
	indexOfFirstMMakeEV := cOperator size + 1.
	1 to: nPoint - 1
		do: 
			[:i | 
			aMMakeEV := CADSMNMTMMakeEV 
						inRegion: aOutsideRegion
						inFace: aFace1
						aEdge: nil
						fromVertex: fromVertex
						toPoint: (crSkVertexSk at: i + 1) rSkPointSk
						orient: nil.
			cOperator add: aMMakeEV do.
			fromVertex := aMMakeEV newVertex].
	aMMakeEFL := CADSMNMTMMakeE 
				inRegion: aOutsideRegion
				inFace: aFace1
				aEdge: cOperator last newEdge
				aVertex: fromVertex
				orient: nil
				aEdge: (cOperator at: indexOfFirstMMakeEV) newEdge
				aVertex: aVertex1
				orient: nil.
	cOperator add: aMMakeEFL do.
	newTopFace := aMMakeEFL newFace.
	newBottomFace := aMMakeEFL aFace.
	self addFaceGeometry</body>

<body package="CADSM-NMT" selector="executeFirstLoop">executeFirstLoop
	"This is the outer loop of a face."

	| firstLoopUse crSkVertexSk nPoint aOutsideRegion aMakeSV aVertex1 aMakeRSFL aFace1 fromVertex indexOfFirstMMakeEV aMMakeEV penultimateEdge firstEdge aMMakeEFL |
	firstLoopUse := aSketchFaceUse cLoopUse at: 1.
	crSkVertexSk := firstLoopUse cEdgeUse 
				collect: [:aEdgeUse | aEdgeUse aVertexUse rSkFacePointSk].
	nPoint := crSkVertexSk size.
	aOutsideRegion := newModel aOutsideRegion.
	aMakeSV := CADSMNMTMakeSV inRegion: aOutsideRegion aPoint: (crSkVertexSk at: 1).
	cOperator add: aMakeSV do.
	aVertex1 := aMakeSV newVertex.
	aMakeRSFL := CADSMNMTMakeRSFL inRegion: aOutsideRegion aVertex: aVertex1.
	cOperator add: aMakeRSFL do.
	aFace1 := aMakeRSFL newFace.
	fromVertex := aVertex1.
	indexOfFirstMMakeEV := cOperator size + 1.
	1 to: nPoint - 1
		do: 
			[:i | 
			aMMakeEV := CADSMNMTMMakeEV 
						inRegion: aOutsideRegion
						inFace: aFace1
						aEdge: nil
						fromVertex: fromVertex
						toPoint: (crSkVertexSk at: i + 1)
						orient: nil.
			cOperator add: aMMakeEV do.
			fromVertex := aMMakeEV newVertex].
	nPoint == 1 
		ifTrue: 
			["Self loop"

			penultimateEdge := nil.
			firstEdge := nil]
		ifFalse: 
			[penultimateEdge := cOperator last newEdge.
			firstEdge := (cOperator at: indexOfFirstMMakeEV) newEdge].
	aMMakeEFL := CADSMNMTMMakeE 
				inRegion: aOutsideRegion
				inFace: aFace1
				aEdge: penultimateEdge
				aVertex: fromVertex
				orient: nil
				aEdge: firstEdge
				aVertex: aVertex1
				orient: nil.
	cOperator add: aMMakeEFL do.
	newTopFace := aMMakeEFL newFace.
	newBottomFace := aMMakeEFL aFace.
	self addTopFaceGeometry.
	self addBottomFaceGeometry</body>

<body package="CADSM-NMT" selector="executeFirstLoop1">executeFirstLoop1
	"This is the outer loop of a face."

	| crSkVertexSk nPoint aOutsideRegion aMakeSV aVertex1 aMakeRSFL aFace1 fromVertex indexOfFirstMMakeEV aMMakeEV aMMakeEFL firstLoopUse |
	firstLoopUse := aSketchFaceUse cLoopUse at: 1.
	crSkVertexSk := firstLoopUse cEdgeUse 
				collect: [:aEdgeUse | aEdgeUse aVertexUse rSkFacePointSk].
	nPoint := crSkVertexSk size.
	aOutsideRegion := newModel aOutsideRegion.
	aMakeSV := CADSMNMTMakeSV inRegion: aOutsideRegion aPoint: (crSkVertexSk at: 1).
	cOperator add: aMakeSV do.
	aVertex1 := aMakeSV newVertex.
	aMakeRSFL := CADSMNMTMakeRSFL inRegion: aOutsideRegion aVertex: aVertex1.
	cOperator add: aMakeRSFL do.
	aFace1 := aMakeRSFL newFace.
	fromVertex := aVertex1.
	indexOfFirstMMakeEV := cOperator size + 1.
	1 to: nPoint - 1
		do: 
			[:i | 
			aMMakeEV := CADSMNMTMMakeEV 
						inRegion: aOutsideRegion
						inFace: aFace1
						aEdge: nil
						fromVertex: fromVertex
						toPoint: (crSkVertexSk at: i + 1)
						orient: nil.
			cOperator add: aMMakeEV do.
			fromVertex := aMMakeEV newVertex].
	aMMakeEFL := CADSMNMTMMakeE 
				inRegion: aOutsideRegion
				inFace: aFace1
				aEdge: cOperator last newEdge
				aVertex: fromVertex
				orient: nil
				aEdge: (cOperator at: indexOfFirstMMakeEV) newEdge
				aVertex: aVertex1
				orient: nil.
	cOperator add: aMMakeEFL do.
	newTopFace := aMMakeEFL newFace.
	newBottomFace := aMMakeEFL aFace.
	self addTopFaceGeometry.
	self addBottomFaceGeometry</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeThinSolid class</class-id> <category>instance creation</category>

<body package="CADSM-NMT" selector="aSketchFaceUse:">aSketchFaceUse: aSketchFaceUse 
	| aMakeThinSolid |
	aMakeThinSolid := self new.
	aMakeThinSolid aSketchFaceUse: aSketchFaceUse.
	^aMakeThinSolid</body>

<body package="CADSM-NMT" selector="cPoint:">cPoint: crPPointP 
	| aMakeThinSolid |
	aMakeThinSolid := self new.
	aMakeThinSolid cPoint: crPPointP.
	^aMakeThinSolid</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakePrism1</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="cBottomPoint">cBottomPoint
	^cBottomPoint</body>

<body package="CADSM-NMT" selector="cBottomPoint:">cBottomPoint: anObject
	cBottomPoint := anObject</body>

<body package="CADSM-NMT" selector="cOperator">cOperator
	^cOperator</body>

<body package="CADSM-NMT" selector="cOperator:">cOperator: anObject
	cOperator := anObject</body>

<body package="CADSM-NMT" selector="cTopPoint">cTopPoint
	^cTopPoint</body>

<body package="CADSM-NMT" selector="cTopPoint:">cTopPoint: anObject
	cTopPoint := anObject</body>

<body package="CADSM-NMT" selector="newModel">newModel
	^newModel</body>

<body package="CADSM-NMT" selector="newModel:">newModel: anObject
	newModel := anObject</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakePrism1</class-id> <category>executing</category>

<body package="CADSM-NMT" selector="execute">execute
	| aMakeThinSolid aMakeLoft |
	aMakeThinSolid := CADSMNMTMakeThinSolid cPoint: cBottomPoint.
	aMakeThinSolid do.
	newModel := aMakeThinSolid newModel.
	cOperator add: aMakeThinSolid.
	aMakeLoft := CADSMNMTMakeLoft 
				inRegion: aMakeThinSolid newModel aOutsideRegion
				onFace: aMakeThinSolid newTopFace
				cTopPoint: cTopPoint.
	aMakeLoft do.
	cOperator add: aMakeLoft</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakePrism1 class</class-id> <category>instance creation</category>

<body package="CADSM-NMT" selector="cTopPoint:cBottomPoint:">cTopPoint: crPTopPointP cBottomPoint: crPBottomPointP 
	| aMakePrism1 |
	aMakePrism1 := self new.
	aMakePrism1 cTopPoint: crPTopPointP.
	aMakePrism1 cBottomPoint: crPBottomPointP.
	^aMakePrism1</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeLoft</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aFace">aFace
	^aFace</body>

<body package="CADSM-NMT" selector="aFace:">aFace: anObject
	aFace := anObject</body>

<body package="CADSM-NMT" selector="aRegion">aRegion
	^aRegion</body>

<body package="CADSM-NMT" selector="aRegion:">aRegion: anObject
	aRegion := anObject</body>

<body package="CADSM-NMT" selector="cTopPoint">cTopPoint
	^cTopPoint</body>

<body package="CADSM-NMT" selector="cTopPoint:">cTopPoint: anObject
	cTopPoint := anObject</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeLoft</class-id> <category>executing</category>

<body package="CADSM-NMT" selector="execute">execute
	| nPoint oldFaceUse oldLoopUse cVertex cTopVertex cUpEdge aMMakeEV1 aMMakeEV2 aMMakeEFL |
	nPoint := cTopPoint size - 1.	"Since first and last points are indentical."
	oldFaceUse := (aFace 
				selectFaceUse: [:aFaceUse | aFaceUse aRegion == aRegion]) soleItem.
	oldLoopUse := (oldFaceUse selectLoopUse: [:aLoopUse | true]) soleItem.
	cVertex := oldLoopUse selectVertex: [:aVertex | true].
	cTopVertex := cVertex copyEmpty.
	cUpEdge := cVertex copyEmpty.

	"Make up edge."
	aMMakeEV1 := CADSMNMTMMakeEV 
				inRegion: aRegion
				inFace: aFace
				aEdge: nil
				fromVertex: (cVertex at: 2)
				toPoint: (cTopPoint at: 2)
				orient: nil.
	cOperator add: aMMakeEV1 do.
	cTopVertex add: aMMakeEV1 newVertex.
	cUpEdge add: aMMakeEV1 newEdge.

	"Make top level edge."
	aMMakeEV2 := CADSMNMTMMakeEV 
				inRegion: aRegion
				inFace: aFace
				aEdge: nil
				fromVertex: aMMakeEV1 newVertex
				toPoint: (cTopPoint at: 1)
				orient: nil.
	cOperator add: aMMakeEV2 do.
	cTopVertex addFirst: aMMakeEV2 newVertex.

	"Make down edge to create a new face."
	aMMakeEFL := CADSMNMTMMakeE 
				inRegion: aRegion
				inFace: aFace
				aEdge: aMMakeEV2 newEdge
				aVertex: aMMakeEV2 newVertex
				orient: nil
				aEdge: (oldLoopUse aEdgeAt: 1)
				aVertex: (cVertex at: 1)
				orient: nil.
	cOperator add: aMMakeEFL do.
	cUpEdge addFirst: aMMakeEFL newEdge.
	cNewSideFace add: aMMakeEFL newFace.
	2 to: nPoint - 1
		do: 
			[:i | 
			"Make up edge."

			aMMakeEV1 := CADSMNMTMMakeEV 
						inRegion: aRegion
						inFace: aFace
						aEdge: nil
						fromVertex: (cVertex at: i + 1)
						toPoint: (cTopPoint at: i + 1)
						orient: nil.
			cOperator add: aMMakeEV1 do.
			cTopVertex add: aMMakeEV1 newVertex.
			cUpEdge add: aMMakeEV1 newEdge.

			"Make top level edge to create a new face."
			aMMakeEFL := CADSMNMTMMakeE 
						inRegion: aRegion
						inFace: aFace
						aEdge: (cUpEdge at: i + 1)
						aVertex: (cTopVertex at: i + 1)
						orient: nil
						aEdge: (cUpEdge at: i)
						aVertex: (cTopVertex at: i)
						orient: nil.
			cOperator add: aMMakeEFL do.
			cNewSideFace add: aMMakeEFL newFace].

	"Make top level edge to create the last new face."
	aMMakeEFL := CADSMNMTMMakeE 
				inRegion: aRegion
				inFace: aFace
				aEdge: (cUpEdge at: nPoint)
				aVertex: (cTopVertex at: nPoint)
				orient: nil
				aEdge: (cUpEdge at: 1)
				aVertex: (cTopVertex at: 1)
				orient: nil.
	cOperator add: aMMakeEFL do.
	cNewSideFace add: aMMakeEFL newFace</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeLoft</class-id> <category>initialize-release</category>

<body package="CADSM-NMT" selector="initialize">initialize
	super initialize.
	cNewSideFace := CADSM.Misc.CADSMMiscOrderedSet new</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeLoft class</class-id> <category>instance creation</category>

<body package="CADSM-NMT" selector="inRegion:onFace:cTopPoint:">inRegion: aRegion onFace: aFace cTopPoint: cTopPoint 
	| aMakeLoft |
	aMakeLoft := self new.
	aMakeLoft aRegion: aRegion.
	aMakeLoft aFace: aFace.
	aMakeLoft cTopPoint: cTopPoint.
	^aMakeLoft</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeFU</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aSurface">aSurface
	^aSurface</body>

<body package="CADSM-NMT" selector="aSurface:">aSurface: anObject
	aSurface := anObject</body>

<body package="CADSM-NMT" selector="cEdgeUse">cEdgeUse
	^cEdgeUse</body>

<body package="CADSM-NMT" selector="cEdgeUse:">cEdgeUse: anObject
	cEdgeUse := anObject</body>

<body package="CADSM-NMT" selector="newFaceUse">newFaceUse
	^newFaceUse</body>

<body package="CADSM-NMT" selector="newFaceUse:">newFaceUse: anObject
	newFaceUse := anObject</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeFU</class-id> <category>executing</category>

<body package="CADSM-NMT" selector="checkNewShellRegion">checkNewShellRegion
	| aModel |
	aModel := newFaceUse aModel.
	aModel unmarkFaceUse.
	newFaceUse markAllOnSameSide.
	newFaceUse mate mark ifFalse: [self createNewShellRegion]</body>

<body package="CADSM-NMT" selector="createNewShellRegion">createNewShellRegion
	"
	Find interior region.
	Find enclosed shells.
	Make new region to include the new shell and the enclosed shells.
	"

	| aModel newRegion newShell newShellUse cMarkedFaceUse |
	aModel := newFaceUse aModel.
	newRegion := aModel newRegion.
	newShell := aModel newShell.
	newShellUse := newShell newUse.
	newRegion addShellUse: newShellUse.
	cMarkedFaceUse := newFaceUse aShellUse 
				selectFaceUse: [:aFaceUse | aFaceUse mark].
	cMarkedFaceUse do: [:aFaceUse | newShellUse addFaceUse: aFaceUse mate]</body>

<body package="CADSM-NMT" selector="execute">execute
	| firstEdgeUse aModel aShellUse newFace newLoop newLoopUse otherLoopUse otherFaceUse aFaceEdgeUse otherFaceEdgeUse |
	firstEdgeUse := cEdgeUse first.
	aModel := firstEdgeUse aModel.
	aShellUse := firstEdgeUse aShellUse.
	newFace := aModel newFaceWithSurface: aSurface.
	newLoop := aModel newLoop.
	newLoopUse := newLoop newUse.
	otherLoopUse := newLoop newUse.
	cEdgeUse do: 
			[:aEdgeUse | 
			aEdgeUse isWireframe 
				ifTrue: 
					[aFaceEdgeUse := aEdgeUse.
					otherFaceEdgeUse := aEdgeUse mate.
					aFaceEdgeUse radial: otherFaceEdgeUse]
				ifFalse: 
					[aFaceEdgeUse := aEdgeUse copy.
					otherFaceEdgeUse := aEdgeUse mate copy.
					aFaceEdgeUse radial: aEdgeUse mate.
					otherFaceEdgeUse radial: aEdgeUse.
					aFaceEdgeUse mate: otherFaceEdgeUse].
			newLoopUse addEdgeUse: aFaceEdgeUse.
			otherLoopUse addEdgeUseFirst: otherFaceEdgeUse].
	newLoopUse mate: otherLoopUse.
	newFaceUse := newFace newUse.
	newFaceUse
		isSameSense: true;
		addLoopUse: newLoopUse.
	otherFaceUse := newFace newUse.
	otherFaceUse
		isSameSense: false;
		addLoopUse: otherLoopUse.
	newFaceUse mate: otherFaceUse.
	aShellUse
		addFaceUse: newFaceUse;
		addFaceUse: otherFaceUse.
	self checkNewShellRegion.
	
	[newFaceUse
		updateuvCurves;
		conditionSelf] 
			on: CADSM.UI.STEP.SurfaceChangedException
			do: 
				[:ex | 
				| aNMTSurface |
				aNMTSurface := ex parameter.
				newFaceUse undateNMTSurface: aNMTSurface.
				ex retry].
	otherFaceUse
		updateuvCurves;
		conditionSelf</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeFU</class-id> <category>As yet unclassified</category>

<body package="CADSM-NMT" selector="die">die
	newFaceUse ifNotNil: [newFaceUse die]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeFU class</class-id> <category>instance creation</category>

<body package="CADSM-NMT" selector="withcEdge:">withcEdge: cEdgeUse 
	| aMakeFU |
	aMakeFU := self new.
	aMakeFU cEdgeUse: cEdgeUse.
	^aMakeFU</body>

<body package="CADSM-NMT" selector="withcEdge:aSurface:">withcEdge: cEdgeUse aSurface: aSurface 
	| aMakeFU |
	aMakeFU := self new.
	aMakeFU cEdgeUse: cEdgeUse.
	aMakeFU aSurface: aSurface.
	^aMakeFU</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTKillE</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aEdge">aEdge
	^aEdge</body>

<body package="CADSM-NMT" selector="aEdge:">aEdge: anObject
	aEdge := anObject</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTKillEMakeL</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aLoop">aLoop
	^aLoop</body>

<body package="CADSM-NMT" selector="aLoop:">aLoop: anObject
	aLoop := anObject</body>

<body package="CADSM-NMT" selector="newLoop">newLoop
	^newLoop</body>

<body package="CADSM-NMT" selector="newLoop:">newLoop: anObject
	newLoop := anObject</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTKillEMakeL</class-id> <category>As yet unclassified</category>

<body package="CADSM-NMT" selector="breakLoopUse:">breakLoopUse: aLoopUse 
	| cEdgeUse newLoopUse cIndex |
	cEdgeUse := aLoopUse cEdgeUse.
	aLoopUse cItemUse: CADSM.Misc.CADSMMiscOrderedSet new.
	newLoopUse := newLoop newUse.
	cIndex := OrderedCollection new.
	1 to: cEdgeUse size
		do: [:i | (cEdgeUse at: i) aEdge == aEdge ifTrue: [cIndex add: i]].
	self assert: [cIndex size == 2].
	1 to: cIndex first - 1 do: [:i | aLoopUse addEdgeUse: (cEdgeUse at: i)].
	cIndex last + 1 to: cEdgeUse size
		do: [:i | aLoopUse addEdgeUse: (cEdgeUse at: i)].
	cIndex first + 1 to: cIndex last - 1
		do: [:i | newLoopUse addEdgeUse: (cEdgeUse at: i)].
	aLoopUse aFaceUse addLoopUse: newLoopUse.
	cIndex do: [:aIndex | (cEdgeUse at: aIndex) die]</body>

<body package="CADSM-NMT" selector="execute">execute
	| aFace aModel aLoopUse newLoopUse aLoopUseMate newLoopUseMate |
	self assert: [aEdge cUse size = 4].
	self assert: 
			[aFace := aEdge cUse first aFace.
			(aEdge cUse detect: [:aEdgeUse | aEdgeUse aFace ~= aFace] ifNone: nil) 
				isNil].
	aLoop := aEdge cUse first aLoop.
	aModel := aEdge aModel.
	newLoop := aModel newLoop.
	aLoopUse := aLoop cUse first.
	self breakLoopUse: aLoopUse.
	newLoopUse := newLoop cUse first.
	aLoopUseMate := aLoopUse mate.
	newLoopUseMate := newLoop newUse.
	aLoopUseMate cItemUse: CADSMMiscOrderedSet new.
	aLoopUse cItemUse 
		do: [:aItemUse | aLoopUseMate addEdgeUseFirst: aItemUse mate].
	newLoopUse cItemUse 
		do: [:aItemUse | newLoopUseMate addEdgeUseFirst: aItemUse mate].
	newLoopUse mate: newLoopUseMate.
	aLoopUseMate aFaceUse addLoopUse: newLoopUseMate</body>

<body package="CADSM-NMT" selector="execute1">execute1
	| aFace aModel aLoopUse |
	self assert: [aEdge cUse size = 4].
	self assert: 
			[aFace := aEdge cUse first aFace.
			(aEdge cUse detect: [:aEdgeUse | aEdgeUse aFace ~= aFace] ifNone: nil) 
				isNil].
	aLoop := aEdge cUse first aLoop.
	aModel := aEdge aModel.
	newLoop := aModel newLoop.
	aLoopUse := aLoop cUse first.
	self breakLoopUse: aLoopUse.
	self breakLoopUse: aLoopUse mate.
	newLoop cUse first mate: newLoop cUse last</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTKillEMakeL class</class-id> <category>As yet unclassified</category>

<body package="CADSM-NMT" selector="aEdge:">aEdge: aEdge 
	^(super new)
		aEdge: aEdge;
		yourself</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeSV</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aPoint">aPoint
	^aPoint</body>

<body package="CADSM-NMT" selector="aPoint:">aPoint: anObject
	aPoint := anObject</body>

<body package="CADSM-NMT" selector="aRegion">aRegion
	^aRegion</body>

<body package="CADSM-NMT" selector="aRegion:">aRegion: anObject
	aRegion := anObject</body>

<body package="CADSM-NMT" selector="newShell">newShell
	^newShell</body>

<body package="CADSM-NMT" selector="newShell:">newShell: anObject
	newShell := anObject</body>

<body package="CADSM-NMT" selector="newVertex">newVertex
	^newVertex</body>

<body package="CADSM-NMT" selector="newVertex:">newVertex: anObject
	newVertex := anObject</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeSV</class-id> <category>executing</category>

<body package="CADSM-NMT" selector="execute">execute
	newVertex := (aRegion selectVertex: [:aVertex | aVertex aPoint = aPoint]) 
				soleItem.
	newVertex ifNil: 
			[| aModel newShellUse |
			aModel := aRegion aModel.
			newShell := aModel newShell.
			newShellUse := newShell newUse.
			newShellUse changeClassToThatOf: CADSMNMTVertexShellUse basicNew.
			aRegion addShellUse: newShellUse.
			newVertex := aModel newVertex: aPoint.
			newShellUse addVertexUse: newVertex newUse]
		ifNotNil: 
			[newShell := (aRegion 
						selectShellUse: [:aShellUse | aShellUse includesVertex: newVertex]) 
							soleItem aNMTItem]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeSV class</class-id> <category>instance creation</category>

<body package="CADSM-NMT" selector="inRegion:aPoint:">inRegion: aRegion aPoint: aPoint 
	| aMakeSV |
	aMakeSV := self new.
	aMakeSV aRegion: aRegion.
	aMakeSV aPoint: aPoint.
	^aMakeSV</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMMakeEV</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aEdge">aEdge
	^aEdge</body>

<body package="CADSM-NMT" selector="aEdge:">aEdge: anObject
	aEdge := anObject</body>

<body package="CADSM-NMT" selector="aFace">aFace
	^aFace</body>

<body package="CADSM-NMT" selector="aFace:">aFace: anObject
	aFace := anObject</body>

<body package="CADSM-NMT" selector="aPoint">aPoint
	^aPoint</body>

<body package="CADSM-NMT" selector="aPoint:">aPoint: anObject
	aPoint := anObject</body>

<body package="CADSM-NMT" selector="aRegion">aRegion
	^aRegion</body>

<body package="CADSM-NMT" selector="aRegion:">aRegion: anObject
	aRegion := anObject</body>

<body package="CADSM-NMT" selector="aVertex">aVertex
	^aVertex</body>

<body package="CADSM-NMT" selector="aVertex:">aVertex: anObject
	aVertex := anObject</body>

<body package="CADSM-NMT" selector="newEdge">newEdge
	^newEdge</body>

<body package="CADSM-NMT" selector="newEdge:">newEdge: anObject
	newEdge := anObject</body>

<body package="CADSM-NMT" selector="newVertex">newVertex
	^newVertex</body>

<body package="CADSM-NMT" selector="newVertex:">newVertex: anObject
	newVertex := anObject</body>

<body package="CADSM-NMT" selector="orient">orient
	^orient</body>

<body package="CADSM-NMT" selector="orient:">orient: anObject
	orient := anObject</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMMakeEV</class-id> <category>executing</category>

<body package="CADSM-NMT" selector="execute">execute
	"
	To do:
	Account for repeated use of vertex in loop.
	"

	| aModel oldFaceUse oldLoopUse oldVertexUse oldEdgeUseNext outEdgeUse inEdgeUse otherOldFaceUse otherOldLoopUse otherOldVertexUse otherOldEdgeUseNext otherOutEdgeUse otherInEdgeUse |
	aModel := aRegion aModel.
	newVertex := aModel newVertex: aPoint.
	newEdge := aModel 
				newEdgeWith: aVertex
				and: newVertex
				aCurve: aCurve.

	"Processing side facing aRegion."
	oldFaceUse := (aFace 
				selectFaceUse: [:aFaceUse | aFaceUse aRegion == aRegion]) soleItem.
	oldLoopUse := (oldFaceUse 
				selectLoopUse: [:aLoopUse | aLoopUse includesVertex: aVertex]) soleItem.
	oldVertexUse := (oldFaceUse 
				selectVertexUse: [:aVertexUse | aVertexUse aNMTItem == aVertex]) soleItem.
	outEdgeUse := newEdge newUse.
	inEdgeUse := newEdge newUse.
	inEdgeUse aVertexUse: newVertex newUse.
	outEdgeUse radial: inEdgeUse.
	oldLoopUse isVertexLoop 
		ifTrue: 
			[outEdgeUse aVertexUse: oldVertexUse.
			oldLoopUse addEdgeUse: outEdgeUse.
			oldLoopUse addEdgeUse: inEdgeUse]
		ifFalse: 
			[outEdgeUse aVertexUse: aVertex newUse.
			oldLoopUse isSelfLoop 
				ifTrue: 
					[oldLoopUse addEdgeUse: outEdgeUse.
					oldLoopUse addEdgeUse: inEdgeUse]
				ifFalse: 
					[oldEdgeUseNext := oldVertexUse aEdgeUse.
					oldLoopUse addEdgeUse: outEdgeUse before: oldEdgeUseNext.
					oldLoopUse addEdgeUse: inEdgeUse before: oldEdgeUseNext]].

	"Processing side facing otherRegion."
	otherOldFaceUse := oldFaceUse mate.
	otherOldLoopUse := oldLoopUse mate.
	otherOldVertexUse := (otherOldFaceUse 
				selectVertexUse: [:aVertexUse | aVertexUse aNMTItem == aVertex]) soleItem.
	otherOutEdgeUse := newEdge newUse.
	otherInEdgeUse := newEdge newUse.
	otherInEdgeUse aVertexUse: newVertex newUse.
	otherOutEdgeUse radial: otherInEdgeUse.
	outEdgeUse mate: otherInEdgeUse.
	inEdgeUse mate: otherOutEdgeUse.
	otherOldLoopUse isVertexLoop 
		ifTrue: 
			[otherOutEdgeUse aVertexUse: otherOldVertexUse.
			otherOldLoopUse addEdgeUse: otherOutEdgeUse.
			otherOldLoopUse addEdgeUse: otherInEdgeUse]
		ifFalse: 
			[otherOutEdgeUse aVertexUse: aVertex newUse.
			otherOldLoopUse isSelfLoop 
				ifTrue: 
					[otherOldLoopUse addEdgeUse: otherOutEdgeUse.
					otherOldLoopUse addEdgeUse: otherInEdgeUse]
				ifFalse: 
					[otherOldEdgeUseNext := otherOldVertexUse aEdgeUse.
					otherOldLoopUse addEdgeUse: otherOutEdgeUse before: otherOldEdgeUseNext.
					otherOldLoopUse addEdgeUse: otherInEdgeUse before: otherOldEdgeUseNext]]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMMakeEV class</class-id> <category>instance creation</category>

<body package="CADSM-NMT" selector="inRegion:inFace:aEdge:fromVertex:toPoint:orient:">inRegion: aRegion inFace: aFace aEdge: aEdge fromVertex: aVertex toPoint: aPoint orient: orient 
	| aMMakeEV |
	aMMakeEV := self new.
	aMMakeEV aRegion: aRegion.
	aMMakeEV aFace: aFace.
	aMMakeEV aEdge: aEdge.
	aMMakeEV aVertex: aVertex.
	aMMakeEV aPoint: aPoint.
	aMMakeEV orient: orient.
	^aMMakeEV</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMMakeE</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aEdge1">aEdge1
	^aEdge1</body>

<body package="CADSM-NMT" selector="aEdge1:">aEdge1: anObject
	aEdge1 := anObject</body>

<body package="CADSM-NMT" selector="aEdge2">aEdge2
	^aEdge2</body>

<body package="CADSM-NMT" selector="aEdge2:">aEdge2: anObject
	aEdge2 := anObject</body>

<body package="CADSM-NMT" selector="aFace">aFace
	^aFace</body>

<body package="CADSM-NMT" selector="aFace:">aFace: anObject
	aFace := anObject</body>

<body package="CADSM-NMT" selector="aRegion">aRegion
	^aRegion</body>

<body package="CADSM-NMT" selector="aRegion:">aRegion: anObject
	aRegion := anObject</body>

<body package="CADSM-NMT" selector="aVertex1">aVertex1
	^aVertex1</body>

<body package="CADSM-NMT" selector="aVertex1:">aVertex1: anObject
	aVertex1 := anObject</body>

<body package="CADSM-NMT" selector="aVertex2">aVertex2
	^aVertex2</body>

<body package="CADSM-NMT" selector="aVertex2:">aVertex2: anObject
	aVertex2 := anObject</body>

<body package="CADSM-NMT" selector="newEdge">newEdge
	^newEdge</body>

<body package="CADSM-NMT" selector="orient1">orient1
	^orient1</body>

<body package="CADSM-NMT" selector="orient1:">orient1: anObject
	orient1 := anObject</body>

<body package="CADSM-NMT" selector="orient2">orient2
	^orient2</body>

<body package="CADSM-NMT" selector="orient2:">orient2: anObject
	orient2 := anObject</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMMakeE class</class-id> <category>instance creation</category>

<body package="CADSM-NMT" selector="inRegion:inFace:aEdge:aVertex:orient:aEdge:aVertex:orient:">inRegion: aRegion inFace: aFace aEdge: aEdge1 aVertex: aVertex1 orient: orient1 aEdge: aEdge2 aVertex: aVertex2 orient: orient2 
	| oldFaceUse oldLoopUse aMMakeESub |
	oldFaceUse := (aFace 
				selectFaceUse: [:aFaceUse | aFaceUse aRegion == aRegion]) soleItem.
	oldLoopUse := (oldFaceUse selectLoopUse: 
					[:aLoopUse | 
					(aLoopUse includesVertex: aVertex1) 
						and: [aLoopUse includesVertex: aVertex2]]) 
				soleItem.
	aMMakeESub := oldLoopUse notNil 
				ifTrue: [CADSMNMTMMakeEFL new]
				ifFalse: [CADSMNMTMMakeEKillL new].
	aMMakeESub aRegion: aRegion.
	aMMakeESub aFace: aFace.
	aMMakeESub aEdge1: aEdge1.
	aMMakeESub aVertex1: aVertex1.
	aMMakeESub orient1: orient1.
	aMMakeESub aEdge2: aEdge2.
	aMMakeESub aVertex2: aVertex2.
	aMMakeESub orient2: orient2.
	^aMMakeESub</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMMakeEFL</class-id> <category>executing</category>

<body package="CADSM-NMT" selector="collectEdgeUseIn:betweenVertex:andVertex:">collectEdgeUseIn: argcEdgeUse betweenVertex: argVertex1 andVertex: argVertex2 
	"
	To do:
	Account for repeated use of vertex in loop.
	"

	| index1 index2 |
	index1 := argcEdgeUse 
				findFirst: [:aEdgeUse | aEdgeUse includesVertex: argVertex1].
	index2 := argcEdgeUse 
				findFirst: [:aEdgeUse | aEdgeUse includesVertex: argVertex2].
	(index1 == 0 or: [index2 == 0]) 
		ifTrue: [self error: 'Vertex not in loop.'].
	^index1 == index2 
		ifTrue: [argcEdgeUse species withSize: 0]
		ifFalse: 
			[index2 := index2 - 1.
			index2 == 0 ifTrue: [index2 := argcEdgeUse size].
			argcEdgeUse copyWrapFrom: index1 to: index2]</body>

<body package="CADSM-NMT" selector="createNormalFace">createNormalFace
	"
	To do:
	Account for holes.
	"

	| aModel oldFaceUse oldLoopUse cEdgeUse1 cEdgeUse2 newFaceUse newLoopUse newEdgeUse12 newEdgeUse21 otherOldFaceUse otherOldLoopUse otherNewFaceUse otherNewLoopUse otherNewEdgeUse21 otherNewEdgeUse12 cEdgeUse |
	aModel := aRegion aModel.
	newFace := aModel newFace.
	newLoop := aModel newLoop.
	newEdge := aModel 
				newEdgeWith: aVertex1
				and: aVertex2
				aCurve: aCurve.

	"Processing side facing aRegion."
	oldFaceUse := (aFace 
				selectFaceUse: [:aFaceUse | aFaceUse aRegion == aRegion]) soleItem.
	oldLoopUse := (oldFaceUse selectLoopUse: 
					[:aLoopUse | 
					(aLoopUse includesVertex: aVertex1) 
						and: [aLoopUse includesVertex: aVertex2]]) 
				soleItem.
	cEdgeUse := oldLoopUse cItemUse.
	cEdgeUse1 := self 
				collectEdgeUseIn: cEdgeUse
				betweenVertex: aVertex2
				andVertex: aVertex1.
	cEdgeUse2 := self 
				collectEdgeUseIn: cEdgeUse
				betweenVertex: aVertex1
				andVertex: aVertex2.
	newFaceUse := newFace newUse.
	oldFaceUse aShellUse addFaceUse: newFaceUse.
	newLoopUse := newLoop newUse.
	newFaceUse addLoopUse: newLoopUse.
	cEdgeUse1 do: [:aEdgeUse | newLoopUse addEdgeUse: aEdgeUse].
	newEdgeUse12 := newEdge newUse.
	newEdgeUse12 aVertexUse: aVertex1 newUse.
	newLoopUse addEdgeUse: newEdgeUse12.	"new faceuse and loopuse in aRegion is complete."
	oldLoopUse emptySelf.
	newEdgeUse21 := newEdge newUse.
	newEdgeUse21 aVertexUse: aVertex2 newUse.
	newEdgeUse12 radial: newEdgeUse21.
	oldLoopUse addEdgeUse: newEdgeUse21.
	cEdgeUse2 do: [:aEdgeUse | oldLoopUse addEdgeUse: aEdgeUse].	"old faceuse and loopuse in aRegion is complete."

	"Processing side facing otherRegion."
	otherOldFaceUse := oldFaceUse mate.
	otherOldLoopUse := oldLoopUse mate.
	cEdgeUse := otherOldLoopUse cItemUse.
	cEdgeUse1 := self 
				collectEdgeUseIn: cEdgeUse
				betweenVertex: aVertex1
				andVertex: aVertex2.
	cEdgeUse2 := self 
				collectEdgeUseIn: cEdgeUse
				betweenVertex: aVertex2
				andVertex: aVertex1.
	otherNewFaceUse := newFace newUse.
	otherOldFaceUse aShellUse addFaceUse: otherNewFaceUse.
	otherNewLoopUse := newLoop newUse.
	otherNewFaceUse addLoopUse: otherNewLoopUse.
	otherNewEdgeUse21 := newEdge newUse.
	otherNewEdgeUse21 aVertexUse: aVertex2 newUse.
	otherNewLoopUse addEdgeUse: otherNewEdgeUse21.
	cEdgeUse1 do: [:aEdgeUse | otherNewLoopUse addEdgeUse: aEdgeUse].	"otherNew faceuse and loopuse in aRegion is complete."
	otherOldLoopUse emptySelf.
	cEdgeUse2 do: [:aEdgeUse | otherOldLoopUse addEdgeUse: aEdgeUse].
	otherNewEdgeUse12 := newEdge newUse.
	otherNewEdgeUse12 aVertexUse: aVertex1 newUse.
	otherNewEdgeUse12 radial: otherNewEdgeUse21.
	otherOldLoopUse addEdgeUse: otherNewEdgeUse12.	"otherOld faceuse and loopuse in aRegion is complete."
	newEdgeUse12 mate: otherNewEdgeUse21.
	newEdgeUse21 mate: otherNewEdgeUse12.
	newLoopUse mate: otherNewLoopUse.
	newFaceUse mate: otherNewFaceUse</body>

<body package="CADSM-NMT" selector="createSelfLoopFace">createSelfLoopFace
	"
	To do:
	Account for holes.
	"

	| aModel oldFaceUse oldLoopUse cEdgeUse1 cEdgeUse2 newFaceUse newLoopUse newEdgeUse12 newEdgeUse21 otherOldFaceUse otherOldLoopUse otherNewFaceUse otherNewLoopUse otherNewEdgeUse21 otherNewEdgeUse12 cEdgeUse index2 index1 |
	aModel := aRegion aModel.
	newFace := aModel newFace.
	newLoop := aModel newLoop.
	newEdge := aModel 
				newEdgeWith: aVertex1
				and: aVertex2
				aCurve: aCurve.

	"Processing side facing aRegion."
	oldFaceUse := (aFace 
				selectFaceUse: [:aFaceUse | aFaceUse aRegion == aRegion]) soleItem.
	oldLoopUse := (oldFaceUse selectLoopUse: 
					[:aLoopUse | 
					(aLoopUse includesVertex: aVertex1) 
						and: [aLoopUse includesVertex: aVertex2]]) 
				soleItem.
	oldLoopUse isVertexLoop 
		ifTrue: 
			[cEdgeUse1 := CADSM.Misc.CADSMMiscOrderedSet new.
			cEdgeUse2 := CADSM.Misc.CADSMMiscOrderedSet new]
		ifFalse: 
			[cEdgeUse := oldLoopUse cItemUse.
			index2 := cEdgeUse 
						findFirst: [:aEdgeUse | aEdgeUse includesVertex: aVertex2].
			index1 := index2 - 1.
			index1 == 0 ifTrue: [index1 := cEdgeUse size].
			cEdgeUse1 := cEdgeUse copyWrapFrom: index2 to: index1.
			cEdgeUse2 := CADSM.Misc.CADSMMiscOrderedSet new].
	newFaceUse := newFace newUse.
	oldFaceUse aShellUse addFaceUse: newFaceUse.
	newLoopUse := newLoop newUse.
	newFaceUse addLoopUse: newLoopUse.
	cEdgeUse1 do: [:aEdgeUse | newLoopUse addEdgeUse: aEdgeUse].
	newEdgeUse12 := newEdge newUse.
	newEdgeUse12 aVertexUse: aVertex1 newUse.
	newLoopUse addEdgeUse: newEdgeUse12.	"new faceuse and loopuse in aRegion is complete."
	oldLoopUse emptySelf.
	newEdgeUse21 := newEdge newUse.
	newEdgeUse21 aVertexUse: aVertex2 newUse.
	newEdgeUse12 radial: newEdgeUse21.
	oldLoopUse addEdgeUse: newEdgeUse21.
	cEdgeUse2 do: [:aEdgeUse | oldLoopUse addEdgeUse: aEdgeUse].	"old faceuse and loopuse in aRegion is complete."

	"Processing side facing otherRegion."
	otherOldFaceUse := oldFaceUse mate.
	otherOldLoopUse := oldLoopUse mate.
	otherOldLoopUse isVertexLoop 
		ifTrue: 
			[cEdgeUse1 := CADSM.Misc.CADSMMiscOrderedSet new.
			cEdgeUse2 := CADSM.Misc.CADSMMiscOrderedSet new]
		ifFalse: 
			[cEdgeUse := otherOldLoopUse cItemUse.
			index1 := cEdgeUse 
						findFirst: [:aEdgeUse | aEdgeUse includesVertex: aVertex1].
			index2 := index1 - 1.
			index2 == 0 ifTrue: [index2 := cEdgeUse size].
			cEdgeUse1 := cEdgeUse copyWrapFrom: index1 to: index2.
			cEdgeUse2 := CADSM.Misc.CADSMMiscOrderedSet new].
	otherNewFaceUse := newFace newUse.
	otherOldFaceUse aShellUse addFaceUse: otherNewFaceUse.
	otherNewLoopUse := newLoop newUse.
	otherNewFaceUse addLoopUse: otherNewLoopUse.
	otherNewEdgeUse21 := newEdge newUse.
	otherNewEdgeUse21 aVertexUse: aVertex2 newUse.
	otherNewLoopUse addEdgeUse: otherNewEdgeUse21.
	cEdgeUse1 do: [:aEdgeUse | otherNewLoopUse addEdgeUse: aEdgeUse].	"otherNew faceuse and loopuse in aRegion is complete."
	otherOldLoopUse emptySelf.
	cEdgeUse2 do: [:aEdgeUse | otherOldLoopUse addEdgeUse: aEdgeUse].
	otherNewEdgeUse12 := newEdge newUse.
	otherNewEdgeUse12 aVertexUse: aVertex1 newUse.
	otherNewEdgeUse12 radial: otherNewEdgeUse21.
	otherOldLoopUse addEdgeUse: otherNewEdgeUse12.	"otherOld faceuse and loopuse in aRegion is complete."
	newEdgeUse12 mate: otherNewEdgeUse21.
	newEdgeUse21 mate: otherNewEdgeUse12.
	newLoopUse mate: otherNewLoopUse.
	newFaceUse mate: otherNewFaceUse</body>

<body package="CADSM-NMT" selector="execute">execute
	"
	To do:
	Account for holes.
	"

	aVertex1 == aVertex2 
		ifTrue: [self createSelfLoopFace]
		ifFalse: [self createNormalFace]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMMakeEFL</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="newFace">newFace
	^newFace</body>

<body package="CADSM-NMT" selector="newFace:">newFace: anObject
	newFace := anObject</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMMakeEKillL</class-id> <category>executing</category>

<body package="CADSM-NMT" selector="execute">execute
	self halt</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeE</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aCurve">aCurve
	^aCurve</body>

<body package="CADSM-NMT" selector="aCurve:">aCurve: anObject
	aCurve := anObject</body>

<body package="CADSM-NMT" selector="aRegion">aRegion
	^aRegion</body>

<body package="CADSM-NMT" selector="aRegion:">aRegion: anObject
	aRegion := anObject</body>

<body package="CADSM-NMT" selector="aVertex">aVertex
	^aVertex1</body>

<body package="CADSM-NMT" selector="aVertex1">aVertex1
	^aVertex1</body>

<body package="CADSM-NMT" selector="aVertex1:">aVertex1: anObject
	aVertex1 := anObject</body>

<body package="CADSM-NMT" selector="aVertex2">aVertex2
	^aVertex2</body>

<body package="CADSM-NMT" selector="aVertex2:">aVertex2: anObject
	aVertex2 := anObject</body>

<body package="CADSM-NMT" selector="newEdge">newEdge
	^newEdge</body>

<body package="CADSM-NMT" selector="newEdge:">newEdge: anObject
	newEdge := anObject</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeE</class-id> <category>executing</category>

<body package="CADSM-NMT" selector="execute">execute
	| acVertex |
	newEdge := (aRegion selectEdge: 
					[:aaEdge | 
					acVertex := aaEdge cVertex.
					(acVertex includes: aVertex1) and: 
							[(acVertex includes: aVertex2) 
								and: [aaEdge aCurve = aCurve or: [aaEdge aCurve = aCurve reverse]]]]) 
				soleItem.
	newEdge ifNil: 
			[| aModel aShellUse outEdgeUse inEdgeUse |
			aModel := aRegion aModel.
			newEdge := aModel 
						newEdgeWith: aVertex1
						and: aVertex2
						aCurve: aCurve.
			outEdgeUse := (newEdge newUse)
						aVertexUse: aVertex1 newUse;
						isSameSense: true;
						yourself.
			inEdgeUse := (newEdge newUse)
						aVertexUse: aVertex2 newUse;
						isSameSense: false;
						yourself.
			outEdgeUse mate: inEdgeUse.
			aShellUse := (aRegion selectShellUse: 
							[:aaShellUse | 
							(aaShellUse includesVertex: aVertex1) 
								and: [aaShellUse includesVertex: aVertex2]]) 
						soleItem.
			aShellUse addEdgeUse: outEdgeUse.
			aShellUse addEdgeUse: inEdgeUse]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeE class</class-id> <category>instance creation</category>

<body package="CADSM-NMT" selector="inRegion:fromVertex:toVertex:aCurve:">inRegion: aRegion fromVertex: aVertex1 toVertex: aVertex2 aCurve: aCurve 
	| aShellUse aMakeESub |
	aShellUse := (aRegion selectShellUse: 
					[:aaShellUse | 
					(aaShellUse includesVertex: aVertex1) 
						and: [aaShellUse includesVertex: aVertex2]]) 
				soleItem.
	aMakeESub := aShellUse ifNotNil: [self new] ifNil: [CADSMNMTMakeEKillS new].
	aMakeESub aRegion: aRegion.
	aMakeESub aVertex1: aVertex1.
	aMakeESub aVertex2: aVertex2.
	aMakeESub aCurve: aCurve.
	^aMakeESub</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeEKillS</class-id> <category>executing</category>

<body package="CADSM-NMT" selector="execute">execute
	| acVertex aModel outEdgeUse inEdgeUse aShellUse1 aShellUse2 |
	newEdge := (aRegion selectEdge: 
					[:aaEdge | 
					acVertex := aaEdge cVertex.
					(acVertex includes: aVertex1) 
						and: [(acVertex includes: aVertex2) and: [aaEdge aCurve = aCurve]]]) 
				soleItem.
	newEdge ifNil: 
			[aModel := aRegion aModel.
			newEdge := aModel 
						newEdgeWith: aVertex1
						and: aVertex2
						aCurve: aCurve.
			outEdgeUse := (newEdge newUse)
						aVertexUse: aVertex1 newUse;
						isSameSense: true;
						yourself.
			inEdgeUse := (newEdge newUse)
						aVertexUse: aVertex2 newUse;
						isSameSense: false;
						yourself.
			outEdgeUse mate: inEdgeUse.
			aShellUse1 := (aRegion 
						selectShellUse: [:aaShellUse | aaShellUse includesVertex: aVertex1]) 
							soleItem.
			aShellUse2 := (aRegion 
						selectShellUse: [:aaShellUse | aaShellUse includesVertex: aVertex2]) 
							soleItem.
			aShellUse1 addEdgeUse: outEdgeUse.
			aShellUse1 addEdgeUse: inEdgeUse.
			aShellUse2 cSub shallowCopy do: [:aSub | aShellUse1 addSub: aSub].
			aShellUse2 die]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeF</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aRegion">aRegion
	^aRegion</body>

<body package="CADSM-NMT" selector="aRegion:">aRegion: anObject
	aRegion := anObject</body>

<body package="CADSM-NMT" selector="cEdge">cEdge
	^cEdge</body>

<body package="CADSM-NMT" selector="cEdge:">cEdge: anObject
	cEdge := anObject</body>

<body package="CADSM-NMT" selector="newFace">newFace
	^newFace</body>

<body package="CADSM-NMT" selector="newFace:">newFace: anObject
	newFace := anObject</body>

<body package="CADSM-NMT" selector="newLoop">newLoop
	^newLoop</body>

<body package="CADSM-NMT" selector="newLoop:">newLoop: anObject
	newLoop := anObject</body>

<body package="CADSM-NMT" selector="newRegion">newRegion
	^newRegion</body>

<body package="CADSM-NMT" selector="newRegion:">newRegion: anObject
	newRegion := anObject</body>

<body package="CADSM-NMT" selector="newShell">newShell
	^newShell</body>

<body package="CADSM-NMT" selector="newShell:">newShell: anObject
	newShell := anObject</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeF</class-id> <category>executing</category>

<body package="CADSM-NMT" selector="execute">execute
	CADSMNMTMakeFU := CADSM.NMT.CADSMNMTMakeFU withEdgeUse: self cEdgeUse.
	CADSMNMTMakeFU do</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeF class</class-id> <category>instance creation</category>

<body package="CADSM-NMT" selector="inRegion:cEdge:">inRegion: aRegion cEdge: cEdge 
	| aMakeF |
	aMakeF := self new.
	aMakeF aRegion: aRegion.
	aMakeF cEdge: cEdge.
	^aMakeF</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeRSFL</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aRegion">aRegion
	^aRegion</body>

<body package="CADSM-NMT" selector="aRegion:">aRegion: anObject
	aRegion := anObject</body>

<body package="CADSM-NMT" selector="aVertex">aVertex
	^aVertex</body>

<body package="CADSM-NMT" selector="aVertex:">aVertex: anObject
	aVertex := anObject</body>

<body package="CADSM-NMT" selector="newFace">newFace
	^newFace</body>

<body package="CADSM-NMT" selector="newLoop">newLoop
	^newLoop</body>

<body package="CADSM-NMT" selector="newRegion">newRegion
	^newRegion</body>

<body package="CADSM-NMT" selector="newShell">newShell
	^newShell</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeRSFL</class-id> <category>executing</category>

<body package="CADSM-NMT" selector="execute">execute
	| aModel aShellUse aVertexUse newFaceUse1 newLoopUse1 newShellUse newFaceUse2 newLoopUse2 newVertexUse |
	aModel := aRegion aModel.
	aShellUse := (aRegion 
				selectShellUse: [:aaShellUse | aaShellUse includesVertex: aVertex]) 
					soleItem.
	aVertexUse := (aShellUse 
				selectVertexUse: [:aaVertexUse | aaVertexUse aNMTItem == aVertex]) soleItem.
	newFace := aModel newFace.	"Positive face point outside."
	newFaceUse1 := newFace newUse.
	aShellUse addFaceUse: newFaceUse1.
	newLoop := aModel newLoop.
	newLoopUse1 := newLoop newUse.
	newFaceUse1 addLoopUse: newLoopUse1.
	newLoopUse1 addVertexUse: aVertexUse.
	newRegion := aModel newRegion.	"Inside region."
	newShell := aModel newShell.
	newShellUse := newShell newUse.
	newRegion addShellUse: newShellUse.
	newFaceUse2 := newFace newUse.
	newShellUse addFaceUse: newFaceUse2.
	newLoopUse2 := newLoop newUse.
	newFaceUse2 addLoopUse: newLoopUse2.
	newVertexUse := aVertex newUse.
	newLoopUse2 addVertexUse: newVertexUse.
	newFaceUse1 mate: newFaceUse2.
	newLoopUse1 mate: newLoopUse2</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeRSFL</class-id> <category>As yet unclassified</category>

<body package="CADSM-NMT" selector="newEdge">newEdge
	^nil</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeRSFL class</class-id> <category>instance creation</category>

<body package="CADSM-NMT" selector="inRegion:aVertex:">inRegion: aRegion aVertex: aVertex 
	| aMakeRSFL |
	aMakeRSFL := self new.
	aMakeRSFL aRegion: aRegion.
	aMakeRSFL aVertex: aVertex.
	^aMakeRSFL</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTSketchedFeature</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aModel">aModel
	^aModel ifNil: 
			[self createModel.
			aModel]</body>

<body package="CADSM-NMT" selector="aModel:">aModel: argModel 
	"aSub maybe already in a tree. Make sure aSub is released by its aSup."

	argModel removeSup.
	aModel := argModel.
	argModel aSup: self.
	^argModel</body>

<body package="CADSM-NMT" selector="aRefFrame">aRefFrame
	^aSketch aRefFrame</body>

<body package="CADSM-NMT" selector="aSketch">aSketch
	^aSketch</body>

<body package="CADSM-NMT" selector="aSketch:">aSketch: argSketch 
	"aSub maybe already in a tree. Make sure aSub is released by its aSup."

	argSketch removeSup.
	aSketch := argSketch.
	argSketch aSup: self.
	^argSketch</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTExtrudedFeature</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="asTreeNode">asTreeNode
	| stream |
	stream := String new writeStream.
	stream nextPutAll: 'Extrusion'.
	stream space.
	stream print: zStart.
	stream space.
	stream print: zEnd.
	^(super asTreeNode)
		displayString: stream contents;
		addChild: aSketch;
		yourself</body>

<body package="CADSM-NMT" selector="createModel">createModel
	| aSketchFaceUse aMakePrism |
	aSketchFaceUse := aSketch aSketchFaceUse.
	aMakePrism := (CADSMNMTMakePrism new)
				aSketchFaceUse: aSketchFaceUse;
				zStart: zStart;
				zEnd: zEnd;
				do.
	self aModel: aMakePrism newModel</body>

<body package="CADSM-NMT" selector="model1">model1
	| crGpolylineG aMakePrism aSketchRefFrame crSpointS crPTopPointP crPBottomPointP |
	crGpolylineG := aSketch asPolylines.
	aSketchRefFrame := aSketch aRefFrame.
	crGpolylineG do: 
			[:polyline | 
			crSpointS := polyline crFpointF.
			crPTopPointP := crSpointS collect: 
							[:point | 
							| newPoint |
							newPoint := point copy.
							newPoint at: 3 put: zEnd.
							aSketchRefFrame rFpFfromrfpf: newPoint].
			crPBottomPointP := crSpointS collect: 
							[:point | 
							| newPoint |
							newPoint := point copy.
							newPoint at: 3 put: zStart.
							aSketchRefFrame rFpFfromrfpf: newPoint].
			aMakePrism := CADSMNMTMakePrism cTopPoint: crPTopPointP
						cBottomPoint: crPBottomPointP.
			aMakePrism do].
	^aMakePrism newModel</body>

<body package="CADSM-NMT" selector="zEnd">zEnd
	^zEnd</body>

<body package="CADSM-NMT" selector="zEnd:">zEnd: anObject
	zEnd := anObject</body>

<body package="CADSM-NMT" selector="zStart">zStart
	^zStart</body>

<body package="CADSM-NMT" selector="zStart:">zStart: anObject
	zStart := anObject</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTExtrudedFeature</class-id> <category>ops</category>

<body package="CADSM-NMT" selector="buildIn:">buildIn: aPartModel 
	aPartModel buildExtrudedFeature: self</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTLoopUse</class-id> <category>enumerating</category>

<body package="CADSM-NMT" selector="selectEdge:into:">selectEdge: aBlock into: aSet 
	cItemUse do: [:each | each selectEdge: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectEdgeUse:into:">selectEdgeUse: aBlock into: aSet 
	cItemUse do: [:each | each selectEdgeUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectLoop:into:">selectLoop: aBlock into: aSet 
	aNMTItem selectLoop: aBlock into: aSet</body>

<body package="CADSM-NMT" selector="selectLoopUse:into:">selectLoopUse: aBlock into: aSet 
	(aBlock value: self) ifTrue: [aSet add: self]</body>

<body package="CADSM-NMT" selector="selectVertex:into:">selectVertex: aBlock into: aSet 
	cItemUse do: [:each | each selectVertex: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectVertexUse:into:">selectVertexUse: aBlock into: aSet 
	cItemUse do: [:each | each selectVertexUse: aBlock into: aSet]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTLoopUse</class-id> <category>initialize-release</category>

<body package="CADSM-NMT" selector="die">die
	cItemUse shallowCopy do: [:aItemUse | aItemUse die].
	mate ifNotNil: 
			[:amate | 
			self mate: nil.
			amate die].
	super die</body>

<body package="CADSM-NMT" selector="emptySelf">emptySelf
	cItemUse asArray do: [:aUse | self removeSub: aUse]</body>

<body package="CADSM-NMT" selector="initialize">initialize
	cItemUse := CADSM.Misc.CADSMMiscOrderedSet new</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTLoopUse</class-id> <category>printing</category>

<body package="CADSM-NMT" selector="printOn:">printOn: aStream 
	aStream nextPutAll: 'aLU'.
	aStream nextPut: $(.
	cItemUse do: [:item | item aVertexUse aVertex aPoint printOn: aStream]
		separatedBy: [aStream space].
	aStream nextPut: $)</body>

<body package="CADSM-NMT" selector="printVerboseOn:">printVerboseOn: aStream 
	aStream
		nextPutAll: 'LoopUse';
		cr;
		printVerbose: cItemUse</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTLoopUse</class-id> <category>displaying</category>

<body package="CADSM-NMT" selector="renderOn:">renderOn: aRenderingContext 
	| cPoint |
	self hasPaint ifTrue: [aRenderingContext paint: self paint].
	self hasAlpha ifTrue: [aRenderingContext alpha: self alpha].
	aRenderingContext lineWidth: self lineWidth.
	self hasStipple 
		ifTrue: 
			[aRenderingContext lineStippleFactor: self stippleFactor
				pattern: self stipplePattern.
			aRenderingContext enableLineStipple].
	cPoint := OrderedCollection new.
	cItemUse do: [:aEdgeUse | cPoint add: aEdgeUse aVertex aPoint].
	cPoint add: cPoint first.
	"	aRenderingContext displayLines: cPoint."
	aRenderingContext displayPolygon: cPoint.
	self hasStipple ifTrue: [aRenderingContext disableLineStipple]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTLoopUse</class-id> <category>ops</category>

<body package="CADSM-NMT" selector="startLoopAtVertex:">startLoopAtVertex: argVertex 
	self cEdgeUse 
		cyclicShiftElementToTop: [:aEdgeUse | aEdgeUse includesVertex: argVertex]</body>

<body package="CADSM-NMT" selector="startLoopAtVertexUse:">startLoopAtVertexUse: argVertexUse 
	self cEdgeUse 
		cyclicShiftElementToTop: [:aEdgeUse | aEdgeUse includesVertexUse: argVertexUse]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTLoopUse</class-id> <category>testing</category>

<body package="CADSM-NMT" selector="isSelfLoop">isSelfLoop
	^cItemUse size == 1</body>

<body package="CADSM-NMT" selector="isVertexLoop">isVertexLoop
	^cItemUse first isVertexUse</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTLoopUse</class-id> <category>As yet unclassified</category>

<body package="CADSM-NMT" selector="addGeometry:onFACE1:">addGeometry: aFACE_BOUND onFACE1: aFACE 
	self assert: [aFACE_BOUND orientation].
	cItemUse with: aFACE_BOUND bound edge_list
		parallelDo: [:aEdgeUse :aORIENTED_EDGE | aEdgeUse addGeometry: aORIENTED_EDGE onFACE: aFACE]</body>

<body package="CADSM-NMT" selector="addGeometry:onFACE2:">addGeometry: aFACE_BOUND onFACE2: aFACE 
	| cORIENTED_EDGE lastEdgeUse lastORIENTED_EDGE preEdgeUse |
	self assert: [aFACE_BOUND orientation].
	cORIENTED_EDGE := aFACE_BOUND bound edge_list.
	lastEdgeUse := cItemUse last.
	lastORIENTED_EDGE := cORIENTED_EDGE last.
	lastEdgeUse 
		addGeometry: lastORIENTED_EDGE
		onFACE: aFACE
		preEdgeUse: nil.
	preEdgeUse := lastEdgeUse.
	cItemUse with: aFACE_BOUND bound edge_list
		parallelDo: 
			[:aEdgeUse :aORIENTED_EDGE | 
			aEdgeUse 
				addGeometry: aORIENTED_EDGE
				onFACE: aFACE
				preEdgeUse: preEdgeUse.
			preEdgeUse := aEdgeUse]</body>

<body package="CADSM-NMT" selector="addGeometry:onFACE:">addGeometry: aFACE_BOUND onFACE: aFACE 
	self assert: [aFACE_BOUND orientation].
	cItemUse with: aFACE_BOUND bound edge_list
		parallelDo: [:aEdgeUse :aORIENTED_EDGE | aEdgeUse addGeometry: aORIENTED_EDGE onFACE: aFACE]</body>

<body package="CADSM-NMT" selector="addMateGeometry">addMateGeometry
	cItemUse do: [:aEdgeUse | aEdgeUse addMateGeometry]</body>

<body package="CADSM-NMT" selector="aFace">aFace
	^aSup aFace</body>

<body package="CADSM-NMT" selector="aLoop">aLoop
	^aNMTItem</body>

<body package="CADSM-NMT" selector="aSurface">aSurface
	^aSup aSurface</body>

<body package="CADSM-NMT" selector="ccuv">ccuv
	^self cFaceEdgeUse collect: [:aFaceEdgeUse | aFaceEdgeUse cuv]</body>

<body package="CADSM-NMT" selector="cFaceEdgeUse">cFaceEdgeUse
	^cItemUse</body>

<body package="CADSM-NMT" selector="conditionSelf">conditionSelf
	"
	Assume there is at most only one singularity per loop.
	(cFaceEdgeUse at: iStart) can have a discontinuity at the beginning.
	Connect the rest beginning from iStart.
	"

	| cFaceEdgeUse n iStart |
	cFaceEdgeUse := self cItemUse.
	n := cFaceEdgeUse size.
	iStart := 1.
	1 to: n
		do: 
			[:i | 
			| cEndSingularity |
			cEndSingularity := (cFaceEdgeUse at: i) cEndSingularity.
			cEndSingularity first 
				ifTrue: 
					[iStart == 1 ifTrue: [iStart := i] ifFalse: [self assert: [iStart = i]]]
				ifFalse: 
					[cEndSingularity last 
						ifTrue: 
							[iStart == 1 ifTrue: [iStart := i + 1] ifFalse: [self assert: [false]]]]].
	(cFaceEdgeUse at: (iStart cyclic: n)) conditionSelf.
	2 to: n
		do: 
			[:i | 
			| ii iipre |
			ii := iStart - 1 + i cyclic: n.
			iipre := ii - 1 cyclic: n.
			(cFaceEdgeUse at: iipre) uv_connectTo: (cFaceEdgeUse at: ii).
			(cFaceEdgeUse at: ii) conditionSelf]</body>

<body package="CADSM-NMT" selector="conditionSelfWithin:">conditionSelfWithin: uvBound 
	"
	Assume there is at most only one singularity per loop.
	(cFaceEdgeUse at: iStart) can have a discontinuity at the beginning.
	Connect the rest beginning from iStart.
	"

	| cFaceEdgeUse n iStart |
	cFaceEdgeUse := self cItemUse.
	n := cFaceEdgeUse size.
	iStart := 1.
	1 to: n
		do: 
			[:i | 
			| cEndSingularity |
			cEndSingularity := (cFaceEdgeUse at: i) cEndSingularity.
			cEndSingularity first 
				ifTrue: 
					[iStart == 1 ifTrue: [iStart := i] ifFalse: [self assert: [iStart = i]]]
				ifFalse: 
					[cEndSingularity last 
						ifTrue: 
							[iStart == 1 ifTrue: [iStart := i + 1] ifFalse: [self assert: [false]]]]].
	(cFaceEdgeUse at: (iStart cyclic: n)) conditionSelfWithin: uvBound.
	2 to: n
		do: 
			[:i | 
			| ii iipre |
			ii := iStart - 1 + i cyclic: n.
			iipre := ii - 1 cyclic: n.
			(cFaceEdgeUse at: iipre) uv_connectTo: (cFaceEdgeUse at: ii).
			(cFaceEdgeUse at: ii) conditionSelfWithin: uvBound]</body>

<body package="CADSM-NMT" selector="removeCurves">removeCurves
	cItemUse do: [:aItemUse | aItemUse removeCurve]</body>

<body package="CADSM-NMT" selector="updateuvCurves">updateuvCurves
	cItemUse do: [:aItemUse | aItemUse updateuvCurves]</body>

<body package="CADSM-NMT" selector="updateuvCurvesOn:">updateuvCurvesOn: xyzSurface 
	cItemUse do: [:aItemUse | aItemUse updateuvCurvesOn: xyzSurface]</body>

<body package="CADSM-NMT" selector="uvEnd">uvEnd
	^cItemUse last uvEnd</body>

<body package="CADSM-NMT" selector="uvStart">uvStart
	^cItemUse first uvStart</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTLoopUse</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="addEdgeUse:">addEdgeUse: aEdgeUse 
	"aSub maybe already in a tree. Make sure aSub is released by its aSup."

	(aEdgeUse isMemberOf: CADSMNMTFaceEdgeUse) 
		ifFalse: [aEdgeUse changeClassToThatOf: CADSMNMTFaceEdgeUse basicNew].
	aEdgeUse removeSup.
	cItemUse add: aEdgeUse.
	aEdgeUse aSup: self.
	^aEdgeUse</body>

<body package="CADSM-NMT" selector="addEdgeUse:before:">addEdgeUse: newEdgeUse before: oldEdgeUse 
	"aSub maybe already in a tree. Make sure aSub is released by its aSup."

	newEdgeUse removeSup.
	cItemUse add: newEdgeUse before: oldEdgeUse.
	newEdgeUse aSup: self.
	^newEdgeUse</body>

<body package="CADSM-NMT" selector="addEdgeUseFirst:">addEdgeUseFirst: aEdgeUse 
	"aSub maybe already in a tree. Make sure aSub is released by its aSup."

	(aEdgeUse isMemberOf: CADSMNMTFaceEdgeUse) 
		ifFalse: [aEdgeUse changeClassToThatOf: CADSMNMTFaceEdgeUse basicNew].
	aEdgeUse removeSup.
	cItemUse addFirst: aEdgeUse.
	aEdgeUse aSup: self.
	^aEdgeUse</body>

<body package="CADSM-NMT" selector="addVertexUse:">addVertexUse: aVertexUse 
	"aSub maybe already in a tree. Make sure aSub is released by its aSup."

	(aVertexUse isMemberOf: CADSMNMTLoopVertexUse) 
		ifFalse: [aVertexUse changeClassToThatOf: CADSMNMTLoopVertexUse basicNew].
	aVertexUse removeSup.
	cItemUse add: aVertexUse.
	aVertexUse aSup: self.
	^aVertexUse</body>

<body package="CADSM-NMT" selector="aEdgeAt:">aEdgeAt: index 
	^(cItemUse at: index) aEdge</body>

<body package="CADSM-NMT" selector="aEdgeUse">aEdgeUse
	^nil</body>

<body package="CADSM-NMT" selector="aFaceUse">aFaceUse
	^aSup aFaceUse</body>

<body package="CADSM-NMT" selector="cEdgeUse">cEdgeUse
	^cItemUse</body>

<body package="CADSM-NMT" selector="cglTrimNurbs">cglTrimNurbs
	^(self triggerEvent: #cglTrimNurbs) ifNil: 
			[| answer |
			answer := self create_cglTrimNurbs.
			self cglTrimNurbs: answer.
			answer]</body>

<body package="CADSM-NMT" selector="cglTrimNurbs:">cglTrimNurbs: cglTrimNurbs 
	self removeActionsForEvent: #cglTrimNurbs.
	cglTrimNurbs ifNotNil: 
			[self 
				when: #cglTrimNurbs
				ask: cglTrimNurbs
				perform: #yourself]</body>

<body package="CADSM-NMT" selector="cItemUse">cItemUse
	^cItemUse</body>

<body package="CADSM-NMT" selector="cItemUse:">cItemUse: anObject
	cItemUse := anObject</body>

<body package="CADSM-NMT" selector="create_cglTrimNurbs">create_cglTrimNurbs
	| cglTrimNurbs |
	cglTrimNurbs := cItemUse collect: [:aItemUse | aItemUse glTrimNurbs].
	^self aSurface condition_cglTrimNurbs: cglTrimNurbs</body>

<body package="CADSM-NMT" selector="cSub">cSub
	^cItemUse</body>

<body package="CADSM-NMT" selector="rSkFacePointSkAt:">rSkFacePointSkAt: t0 
	^aSup rSkFacePointSkAt: t0</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTVertexUse</class-id> <category>testing</category>

<body package="CADSM-NMT" selector="includes:">includes: argNMTItem 
	^self == argNMTItem ifTrue: [true] ifFalse: [aNMTItem == argNMTItem]</body>

<body package="CADSM-NMT" selector="isVertexUse">isVertexUse
	^true</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTVertexUse</class-id> <category>enumerating</category>

<body package="CADSM-NMT" selector="selectEdge:into:">selectEdge: aBlock into: aSet 
	"Do nothing."</body>

<body package="CADSM-NMT" selector="selectEdgeUse:into:">selectEdgeUse: aBlock into: aSet 
	"Do nothing."</body>

<body package="CADSM-NMT" selector="selectFace:into:">selectFace: aBlock into: aSet 
	"Do nothing."</body>

<body package="CADSM-NMT" selector="selectFaceUse:into:">selectFaceUse: aBlock into: aSet 
	"Do nothing."</body>

<body package="CADSM-NMT" selector="selectLoop:into:">selectLoop: aBlock into: aSet 
	"Do nothing."</body>

<body package="CADSM-NMT" selector="selectLoopUse:into:">selectLoopUse: aBlock into: aSet 
	"Do nothing."</body>

<body package="CADSM-NMT" selector="selectVertex:into:">selectVertex: aBlock into: aSet 
	aNMTItem selectVertex: aBlock into: aSet</body>

<body package="CADSM-NMT" selector="selectVertexUse:into:">selectVertexUse: aBlock into: aSet 
	(aBlock value: self) ifTrue: [aSet add: self]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTVertexUse</class-id> <category>printing</category>

<body package="CADSM-NMT" selector="printOn:">printOn: aStream 
	aStream nextPutAll: 'VU('.
	self aPoint do: [:element | element printOn: aStream]
		separatedBy: [aStream space].
	aStream nextPut: $)</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTVertexUse</class-id> <category>copying</category>

<body package="CADSM-NMT" selector="copy">copy
	^self aNMTItem newUse</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTVertexUse</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aEdgeUse">aEdgeUse
	^aSup aEdgeUse</body>

<body package="CADSM-NMT" selector="aPoint">aPoint
	^aNMTItem aPoint</body>

<body package="CADSM-NMT" selector="aVertex">aVertex
	^aNMTItem</body>

<body package="CADSM-NMT" selector="aVertexUse">aVertexUse
	^self</body>

<body package="CADSM-NMT" selector="rSkFacePointSk">rSkFacePointSk
	^aSup rSkFacePointSkAt: self t0</body>

<body package="CADSM-NMT" selector="t0">t0
	^aPoint</body>

<body package="CADSM-NMT" selector="t:">t: anObject 
	aPoint := anObject</body>

<body package="CADSM-NMT" selector="tORuORuvORxyz">tORuORuvORxyz
	^aPoint</body>

<body package="CADSM-NMT" selector="tORuORuvORxyz:">tORuORuvORxyz: anObject
	aPoint := anObject</body>

<body package="CADSM-NMT" selector="u0">u0
	^aPoint</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTEdgeVertexUse</class-id> <category>As yet unclassified</category>

<body package="CADSM-NMT" selector="isStartOf:">isStartOf: aEdge 
	^aNMTItem isStartOf: aEdge</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTShell</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aShell">aShell
	^self</body>

<body package="CADSM-NMT" selector="removeSup">removeSup
	aSup ifNotNil: [:aaSup | aaSup removeShell: self]</body>

<body package="CADSM-NMT" selector="useClass">useClass
	^CADSM.NMT.CADSMNMTShellUse</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTShell</class-id> <category>enumerating</category>

<body package="CADSM-NMT" selector="selectEdge:into:">selectEdge: aBlock into: aSet 
	cUse do: [:each | each selectEdge: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectEdgeUse:into:">selectEdgeUse: aBlock into: aSet 
	cUse do: [:each | each selectEdgeUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectFace:into:">selectFace: aBlock into: aSet 
	cUse do: [:each | each selectFace: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectFaceUse:into:">selectFaceUse: aBlock into: aSet 
	cUse do: [:each | each selectFaceUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectLoop:into:">selectLoop: aBlock into: aSet 
	cUse do: [:each | each selectLoop: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectLoopUse:into:">selectLoopUse: aBlock into: aSet 
	cUse do: [:each | each selectLoopUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectShell:into:">selectShell: aBlock into: aSet 
	(aBlock value: self) ifTrue: [aSet add: self]</body>

<body package="CADSM-NMT" selector="selectShellUse:into:">selectShellUse: aBlock into: aSet 
	cUse do: [:each | each selectShellUse: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectVertex:into:">selectVertex: aBlock into: aSet 
	cUse do: [:each | each selectVertex: aBlock into: aSet]</body>

<body package="CADSM-NMT" selector="selectVertexUse:into:">selectVertexUse: aBlock into: aSet 
	cUse do: [:each | each selectVertexUse: aBlock into: aSet]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTShell</class-id> <category>printing</category>

<body package="CADSM-NMT" selector="printOn:">printOn: aStream 
	aStream nextPutAll: 'aS'.
	aStream print: (self selectShell: [:item | true]) size.
	aStream nextPutAll: ':F'.
	aStream print: (self selectFace: [:item | true]) size.
	aStream nextPutAll: ':L'.
	aStream print: (self selectLoop: [:item | true]) size.
	aStream nextPutAll: ':E'.
	aStream print: (self selectEdge: [:item | true]) size.
	aStream nextPutAll: ':V'.
	aStream print: (self selectVertex: [:item | true]) size.
	aStream nextPutAll: ':FU'.
	aStream print: (self selectFaceUse: [:item | true]) size.
	aStream nextPutAll: ':LU'.
	aStream print: (self selectLoopUse: [:item | true]) size.
	aStream nextPutAll: ':EU'.
	aStream print: (self selectEdgeUse: [:item | true]) size.
	aStream nextPutAll: ':VU'.
	aStream print: (self selectVertexUse: [:item | true]) size</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeEV</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aCurve">aCurve
	^aCurve</body>

<body package="CADSM-NMT" selector="aCurve:">aCurve: anObject
	aCurve := anObject</body>

<body package="CADSM-NMT" selector="aPoint">aPoint
	^aPoint</body>

<body package="CADSM-NMT" selector="aPoint:">aPoint: anObject
	aPoint := anObject</body>

<body package="CADSM-NMT" selector="aRegion">aRegion
	^aRegion</body>

<body package="CADSM-NMT" selector="aRegion:">aRegion: anObject
	aRegion := anObject</body>

<body package="CADSM-NMT" selector="aVertex">aVertex
	^aVertex</body>

<body package="CADSM-NMT" selector="aVertex:">aVertex: anObject
	aVertex := anObject</body>

<body package="CADSM-NMT" selector="newEdge">newEdge
	^newEdge</body>

<body package="CADSM-NMT" selector="newEdge:">newEdge: anObject
	newEdge := anObject</body>

<body package="CADSM-NMT" selector="newVertex">newVertex
	^newVertex</body>

<body package="CADSM-NMT" selector="newVertex:">newVertex: anObject
	newVertex := anObject</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeEV</class-id> <category>executing</category>

<body package="CADSM-NMT" selector="execute">execute
	| aMakeE |
	newVertex := (aRegion selectVertex: [:aaVertex | aaVertex aPoint = aPoint]) 
				soleItem.
	newVertex ifNil: 
			[| aModel aShellUse outEdgeUse inEdgeUse |
			aModel := aRegion aModel.
			newVertex := aModel newVertex: aPoint.
			newEdge := aModel 
						newEdgeWith: aVertex
						and: newVertex
						aCurve: aCurve.
			outEdgeUse := (newEdge newUse)
						aVertexUse: aVertex newUse;
						isSameSense: true;
						yourself.
			inEdgeUse := (newEdge newUse)
						aVertexUse: newVertex newUse;
						isSameSense: false;
						yourself.
			outEdgeUse mate: inEdgeUse.
			aShellUse := (aRegion 
						selectShellUse: [:aaShellUse | aaShellUse includesVertex: aVertex]) 
							soleItem.
			aShellUse addEdgeUse: outEdgeUse.
			aShellUse addEdgeUse: inEdgeUse]
		ifNotNil: 
			[aMakeE := CADSM.NMT.CADSMNMTMakeE 
						inRegion: aRegion
						fromVertex: aVertex
						toVertex: newVertex
						aCurve: aCurve.
			aMakeE do.
			newEdge := aMakeE newEdge]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTMakeEV class</class-id> <category>As yet unclassified</category>

<body package="CADSM-NMT" selector="inRegion:fromVertex:toPoint:aCurve:">inRegion: aRegion fromVertex: aVertex toPoint: aPoint aCurve: aCurve 
	| aMMakeEV |
	aMMakeEV := self new.
	aMMakeEV aRegion: aRegion.
	aMMakeEV aVertex: aVertex.
	aMMakeEV aPoint: aPoint.
	aMMakeEV aCurve: aCurve.
	^aMMakeEV</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTVertex</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aPoint">aPoint
	^aPoint</body>

<body package="CADSM-NMT" selector="aPoint:">aPoint: anObject
	aPoint := anObject</body>

<body package="CADSM-NMT" selector="removeSup">removeSup
	aSup ifNotNil: [:aaSup | aaSup removeVertex: self]</body>

<body package="CADSM-NMT" selector="useClass">useClass
	^CADSM.NMT.CADSMNMTVertexUse</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTVertex</class-id> <category>enumerating</category>

<body package="CADSM-NMT" selector="selectVertex:into:">selectVertex: aBlock into: aSet 
	(aBlock value: self) ifTrue: [aSet add: self]</body>

<body package="CADSM-NMT" selector="selectVertexUse:into:">selectVertexUse: aBlock into: aSet 
	cUse do: [:each | each selectVertexUse: aBlock into: aSet]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTVertex</class-id> <category>printing</category>

<body package="CADSM-NMT" selector="printOn:">printOn: aStream 
	aStream nextPutAll: 'aV'.
	aStream print: (self selectVertex: [:item | true]) size.
	aStream nextPutAll: ':VU'.
	aStream print: (self selectVertexUse: [:item | true]) size.
	aStream nextPutAll: ' ('.
	self aPoint do: [:element | element printOn: aStream]
		separatedBy: [aStream space].
	aStream nextPut: $)</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTVertex</class-id> <category>As yet unclassified</category>

<body package="CADSM-NMT" selector="isSpatial">isSpatial
	^true</body>

<body package="CADSM-NMT" selector="isStartOf:">isStartOf: aEdge 
	| tol aCurve |
	tol := 1.0d-6 * aPoint length.
	aCurve := aEdge aCurve.
	^(aCurve rFstartF equal: aPoint tol: tol) 
		ifTrue: [true]
		ifFalse: 
			[self assert: [aCurve rFendF equal: aPoint tol: tol].
			false]</body>

<body package="CADSM-NMT" selector="magnifySelf:">magnifySelf: aDouble 
	aPoint magnifySelf: aDouble</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTVertex class</class-id> <category>instance creation</category>

<body package="CADSM-NMT" selector="new:">new: aPoint 
	| aVertex |
	aVertex := self new.
	aVertex aPoint: aPoint.
	^aVertex</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTEdgeUse</class-id> <category>enumerating</category>

<body package="CADSM-NMT" selector="selectEdge:into:">selectEdge: aBlock into: aSet 
	aNMTItem selectEdge: aBlock into: aSet</body>

<body package="CADSM-NMT" selector="selectEdgeUse:into:">selectEdgeUse: aBlock into: aSet 
	(aBlock value: self) ifTrue: [aSet add: self]</body>

<body package="CADSM-NMT" selector="selectFace:into:">selectFace: aBlock into: aSet 
	"Do nothing."

	</body>

<body package="CADSM-NMT" selector="selectFaceUse:into:">selectFaceUse: aBlock into: aSet 
	"Do nothing."</body>

<body package="CADSM-NMT" selector="selectLoop:into:">selectLoop: aBlock into: aSet 
	"Do nothing."</body>

<body package="CADSM-NMT" selector="selectLoopUse:into:">selectLoopUse: aBlock into: aSet 
	"Do nothing."</body>

<body package="CADSM-NMT" selector="selectVertex:into:">selectVertex: aBlock into: aSet 
	aVertexUse selectVertex: aBlock into: aSet</body>

<body package="CADSM-NMT" selector="selectVertexUse:into:">selectVertexUse: aBlock into: aSet 
	aVertexUse selectVertexUse: aBlock into: aSet</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTEdgeUse</class-id> <category>printing</category>

<body package="CADSM-NMT" selector="printOn:">printOn: aStream 
	aStream nextPutAll: 'aEU'.
	aStream print: (self selectEdgeUse: [:item | true]) size.
	aStream nextPutAll: ':VU'.
	aStream print: (self selectVertexUse: [:item | true]) size</body>

<body package="CADSM-NMT" selector="printVerboseOn:">printVerboseOn: aStream 
	aStream
		nextPutAll: 'EdgeUse';
		cr;
		printVerbose: aCurve;
		cr;
		nextPutAll: 'isSameSense = ';
		printVerbose: isSameSense</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTEdgeUse</class-id> <category>copying</category>

<body package="CADSM-NMT" selector="copy">copy
	^(self aNMTItem newUse)
		aVertexUse: aVertexUse copy;
		aCurve: aCurve copy;
		isSameSense: isSameSense;
		yourself</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTEdgeUse</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aCurve">aCurve
	^aCurve</body>

<body package="CADSM-NMT" selector="aCurve:">aCurve: aaCurve 
	aCurve := aaCurve</body>

<body package="CADSM-NMT" selector="addPositiveCurve:">addPositiveCurve: aaCurve 
	| positiveEdgeUse negativeEdgeUse |
	positiveEdgeUse := self.
	negativeEdgeUse := positiveEdgeUse mate.
	positiveEdgeUse uvOFt: aaCurve.
	negativeEdgeUse uvOFt: aaCurve.
	positiveEdgeUse isSameSense: true.
	negativeEdgeUse isSameSense: false</body>

<body package="CADSM-NMT" selector="aEdge">aEdge
	^aNMTItem</body>

<body package="CADSM-NMT" selector="aEdgeUse">aEdgeUse
	^self</body>

<body package="CADSM-NMT" selector="aEndPoint">aEndPoint
	^self mate aVertex aPoint</body>

<body package="CADSM-NMT" selector="aFaceUse">aFaceUse
	^aSup aFaceUse</body>

<body package="CADSM-NMT" selector="aPoint">aPoint
	"Dummy method template.  This was installed by the debugger
	define method command."

	^self halt</body>

<body package="CADSM-NMT" selector="aSketch">aSketch
	^aCurve aSketch</body>

<body package="CADSM-NMT" selector="aSketchRefFrame">aSketchRefFrame
	^aCurve aSketchRefFrame</body>

<body package="CADSM-NMT" selector="aStartPoint">aStartPoint
	^self aVertex aPoint</body>

<body package="CADSM-NMT" selector="aVertex">aVertex
	^aVertexUse aVertex</body>

<body package="CADSM-NMT" selector="aVertexUse">aVertexUse
	^aVertexUse</body>

<body package="CADSM-NMT" selector="aVertexUse:">aVertexUse: argVertexUse 
	"aSub maybe already in a tree. Make sure aSub is released by its aSup."

	(argVertexUse isMemberOf: CADSMNMTEdgeVertexUse) 
		ifFalse: [argVertexUse changeClassToThatOf: CADSMNMTEdgeVertexUse basicNew].
	argVertexUse removeSup.
	aVertexUse := argVertexUse.
	argVertexUse aSup: self.
	^argVertexUse</body>

<body package="CADSM-NMT" selector="isSameSense">isSameSense
	^isSameSense</body>

<body package="CADSM-NMT" selector="isSameSense:">isSameSense: aBoolean 
	isSameSense := aBoolean</body>

<body package="CADSM-NMT" selector="negated">negated
	isSameSense := isSameSense not</body>

<body package="CADSM-NMT" selector="radial">radial
	^radial</body>

<body package="CADSM-NMT" selector="radial:">radial: aEdgeUse 
	radial := aEdgeUse.
	aEdgeUse 
		ifNotNil: [aEdgeUse radial == self ifFalse: [aEdgeUse radial: self]]</body>

<body package="CADSM-NMT" selector="removeSub:">removeSub: aSub 
	^aVertexUse == aSub 
		ifTrue: 
			[aVertexUse := nil.
			aSub aSup: nil.
			aSub]
		ifFalse: [self halt: 'check this']</body>

<body package="CADSM-NMT" selector="rFfF3:">rFfF3: double 
	aCurve aRefFrame rFfF at: 3 put: double</body>

<body package="CADSM-NMT" selector="rSkFacePointSkAt:">rSkFacePointSkAt: t0 
	^aSup rSkFacePointSkAt: (self uvOFt value: t0)</body>

<body package="CADSM-NMT" selector="rSkPointSk">rSkPointSk
	| xyzCurve u0 rfpf |
	xyzCurve := aCurve.
	u0 := aVertexUse u0.
	rfpf := xyzCurve atU: u0.
	^xyzCurve aRefFrame rFpFfromrfpf: rfpf</body>

<body package="CADSM-NMT" selector="uvOFt">uvOFt
	^aCurve</body>

<body package="CADSM-NMT" selector="uvOFt:">uvOFt: anObject 
	aCurve := anObject</body>

<body package="CADSM-NMT" selector="xyzOFu">xyzOFu
	^aCurve</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTEdgeUse</class-id> <category>testing</category>

<body package="CADSM-NMT" selector="isWireframe">isWireframe
	^false</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTEdgeUse</class-id> <category>As yet unclassified</category>

<body package="CADSM-NMT" selector="xyzCurve">xyzCurve
	^aNMTItem aCurve ifNotNil: 
			[:xyzCurve | 
			isSameSense ifTrue: [xyzCurve copy] ifFalse: [xyzCurve copy reverseSelf]]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTFaceEdgeUse</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="die">die
	aVertexUse ifNotNil: [:amate | aVertexUse die].
	aCurve ifNotNil: 
			[:aaCurve | 
			aCurve := nil.
			aaCurve removeSup].
	radial ifNotNil: 
			[radial radial: mate radial.
			radial := nil.
			mate radial: nil].
	mate ifNotNil: 
			[:amate | 
			mate := nil.
			amate die].
	super die</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTFaceEdgeUse</class-id> <category>As yet unclassified</category>

<body package="CADSM-NMT" selector="addGeometry:onFACE:">addGeometry: aORIENTED_EDGE onFACE: aFACE 
	self aCurve: (aORIENTED_EDGE xyzCurve uvCurveOnSurface: aFACE aSurface).
	self isSameSense: true</body>

<body package="CADSM-NMT" selector="addGeometry:onFACE:preEdgeUse:">addGeometry: aORIENTED_EDGE onFACE: aFACE preEdgeUse: preEdgeUse 
	self aCurve: (aORIENTED_EDGE xyzCurve uvCurveOnSurface: aFACE aSurface
				preCurve: (preEdgeUse ifNotNil: [:a | a _aCurve])).
	self isSameSense: true</body>

<body package="CADSM-NMT" selector="addMateGeometry">addMateGeometry
	mate aCurve: aCurve.
	mate isSameSense: false</body>

<body package="CADSM-NMT" selector="aFace">aFace
	^aSup aFace</body>

<body package="CADSM-NMT" selector="aLoop">aLoop
	^aSup aLoop</body>

<body package="CADSM-NMT" selector="aSurface">aSurface
	^aSup aSurface</body>

<body package="CADSM-NMT" selector="cEndSingularity">cEndSingularity
	^self aSurface cEndSingularityOf: aCurve</body>

<body package="CADSM-NMT" selector="conditionSelf">conditionSelf
	aCurve ifNotNil: [self aSurface smooth_cuv: aCurve]</body>

<body package="CADSM-NMT" selector="conditionSelfWithin:">conditionSelfWithin: uvBound 
	self aSurface smooth_cuv: aCurve within: uvBound</body>

<body package="CADSM-NMT" selector="create_glNurbs">create_glNurbs
	| glNurbs |
	glNurbs := aCurve glNurbs.
	self aFaceUse isSameSense 
		ifFalse: [glNurbs cPoint do: [:aPoint | aPoint x: aPoint x negated]].
	^isSameSense ifTrue: [glNurbs] ifFalse: [glNurbs reverse]</body>

<body package="CADSM-NMT" selector="create_glTrimNurbs">create_glTrimNurbs
	| glTrimNurbs |
	glTrimNurbs := aCurve glTrimNurbs.
	self aFaceUse isSameSense 
		ifFalse: [glTrimNurbs cPoint do: [:aPoint | aPoint x: aPoint x negated]].
	^isSameSense ifTrue: [glTrimNurbs] ifFalse: [glTrimNurbs reverse]</body>

<body package="CADSM-NMT" selector="create_glTrimNurbs1">create_glTrimNurbs1
	| glTrimNurbs |
	glTrimNurbs := aCurve glTrimNurbs.
	self aFaceUse isSameSense 
		ifFalse: [glTrimNurbs cPoint do: [:aPoint | aPoint x: aPoint x negated]].
	^isSameSense ifTrue: [glTrimNurbs] ifFalse: [glTrimNurbs reverse]</body>

<body package="CADSM-NMT" selector="cuv">cuv
	^self aCurve ifNotNil: [:aaCurve | aaCurve cuv]
		ifNil: [CADSMMiscOrderedSet new]</body>

<body package="CADSM-NMT" selector="glTrimNurbs">glTrimNurbs
	^self aCurve glTrimNurbs</body>

<body package="CADSM-NMT" selector="removeCurve">removeCurve
	aCurve := nil</body>

<body package="CADSM-NMT" selector="selectCurve:into:">selectCurve: aBlock into: aSet 
	(aBlock value: aCurve) ifTrue: [aSet add: aCurve]</body>

<body package="CADSM-NMT" selector="updateuvCurves">updateuvCurves
	"Dummy method template.  This was installed by the debugger
	define method command."

	^self halt</body>

<body package="CADSM-NMT" selector="updateuvCurvesOn:">updateuvCurvesOn: xyzSurface 
	aNMTItem aCurve 
		ifNotNil: [aCurve := self xyzCurve uvCurveOnSurface: xyzSurface]</body>

<body package="CADSM-NMT" selector="uvEnd">uvEnd
	^isSameSense ifTrue: [aCurve uvEnd] ifFalse: [aCurve uvStart]</body>

<body package="CADSM-NMT" selector="uvStart">uvStart
	^isSameSense ifTrue: [aCurve uvStart] ifFalse: [aCurve uvEnd]</body>

<body package="CADSM-NMT" selector="uv_connectTo:">uv_connectTo: aFaceEdgeUse 
	self aCurve ifNotNil: 
			[:a1Curve | 
			aFaceEdgeUse aCurve ifNotNil: [:a2Curve | a1Curve uv_connectTo: a2Curve]]</body>

<body package="CADSM-NMT" selector="_aCurve">_aCurve
	^isSameSense ifTrue: [aCurve] ifFalse: [aCurve reverse]</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTWireEdgeUse</class-id> <category>accessing</category>

<body package="CADSM-NMT" selector="aFaceEdgeUse">aFaceEdgeUse
	^self</body>
</methods>

<methods>
<class-id>CADSM.NMT.CADSMNMTWireEdgeUse</class-id> <category>testing</category>

<body package="CADSM-NMT" selector="isWireframe">isWireframe
	^true</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>CADSMItem</name>
<environment>Smalltalk</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-Basic</category>
<attributes>
<package>CADSM</package>
</attributes>
</class>

<class>
<name>CADSMGeoPlane</name>
<environment>CADSM.Geo</environment>
<super>CADSM.Geo.CADSMGeoSurface</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>aRectSurface </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category>CADSM-Geo-Basic</category>
<attributes>
<package>CADSM-Geo</package>
</attributes>
</class>

</st-source>
