1+ "use strict" ;
12// shape factory
23const occ = require ( "./occ" ) ;
3- const should = require ( "should " ) ;
4+ const assert = require ( "assert " ) ;
45
56/**
67 *
@@ -10,7 +11,7 @@ const should = require("should");
1011 * @returns {* }
1112 */
1213exports . makeBottle = function ( occ , parameters ) {
13- occ . hasOwnProperty ( "makeLine" ) . should . eql ( true ) ;
14+ assert ( occ . hasOwnProperty ( "makeLine" ) ) ;
1415
1516 parameters = parameters || { } ;
1617
@@ -41,23 +42,23 @@ exports.makeBottle = function (occ, parameters) {
4142
4243 const aHalfWire = occ . makeWire ( aSegment1 , aArc1 , aSegment2 ) ;
4344
44- aHalfWire . isClosed . should . equal ( false ) ;
45-
46- aHalfWire . numEdges . should . equal ( 3 ) ;
47- aHalfWire . numVertices . should . equal ( 4 ) ;
45+ assert ( false === aHalfWire . isClosed ) ;
46+
47+ assert ( 3 === aHalfWire . numEdges ) ;
48+ assert ( 4 === aHalfWire . numVertices ) ;
4849
4950 const trsf = occ . makePlaneMirror ( [ 0 , 0 , 0 ] , [ 0 , 1 , 0 ] ) ;
5051
5152 const aMirroredWire = aHalfWire . transformed ( trsf ) ;
52- aMirroredWire . isClosed . should . equal ( false ) ;
53-
53+ assert ( false === aMirroredWire . isClosed ) ;
54+
5455 const aWire = occ . makeWire ( aHalfWire , aMirroredWire ) ;
5556
56- aWire . isClosed . should . equal ( true ) ;
57-
57+ asser ( aWire . isClosed ) ;
58+
5859 const aFace = occ . makeFace ( aWire ) ;
59- aFace . numWires . should . equal ( 1 ) ;
60-
60+ assert ( 1 === aFace . numWires ) ;
61+
6162 let myBody = occ . makePrism ( aFace , [ 0 , 0 , myHeight ] ) ;
6263
6364 myBody = occ . makeFillet ( myBody , myBody . getEdges ( ) , myFilletRadius ) ;
@@ -93,7 +94,6 @@ exports.makeBottle = function (occ, parameters) {
9394} ;
9495
9596exports . makePan = function ( csg , _height , _radius ) {
96- "use strict" ;
9797
9898 const height = _height || 20 ;
9999 const radius = _radius || 25.0 ;
@@ -205,7 +205,6 @@ exports.makeRoundedPlate = function (csg, R1, R2, L, thickness) {
205205
206206exports . makeRivetPlate = function ( csg , params ) {
207207 // see http://www.tracepartsonline.net/%28S%281gpggj45ixmu5o5540hxuofo%29%29/PartsDefs/Production/ALCOA/22-02072002-063054/documents/AJAL103.pdf
208- "use strict" ;
209208 // { A: 18, B:7, C:6.0, F:4.7, H:3.6, H1:2.0, H2:3.0, J:6.0, K:2.5, R:2.5, V:1.5 }
210209 // { A: 24.3, B:9.5, C:8.5, F:4.7, H:5.3, H1:2.8, H2:4.8, J:8.0, K:2.5, R:3.0, V:1.5 }
211210 // { A: 26.0, B:11.0, C:9.5, F:4.7, H:6.0, H1:3.5, H2:5.5, J:8.0, K:2.5, R:3.0, V:1.5 }
@@ -632,7 +631,7 @@ exports.makePiston = function (occ) {
632631 const e6 = occ . makeLine ( q2 , q1 ) ;
633632
634633 const wire1 = occ . makeWire ( e1 , e2 , e3 , e4 , e5 , e6 ) ;
635- wire1 . numEdges . should . equal ( 6 ) ;
634+ assert ( 6 === wire1 . numEdges ) ;
636635
637636 const face1 = occ . makeFace ( wire1 ) ;
638637
@@ -670,8 +669,8 @@ exports.makeTutorialPart = function (occ) {
670669 const e8 = occ . makeArc3P ( p7 , p8 , p0 ) ;
671670
672671 const wire = occ . makeWire ( e1 , e2 , e3 , e4 , e5 , e6 , e7 , e8 ) ;
673- wire . isClosed . should . eql ( true ) ;
674-
672+ assert ( true === wire . isClosed ) ;
673+
675674 const height = 20 ;
676675 const face = occ . makeFace ( wire ) ;
677676 const body1 = occ . makePrism ( face , [ 0 , 0 , height ] ) ;
0 commit comments