@@ -39,7 +39,6 @@ export class OccHelper {
39
39
points . push ( pt2g ) ;
40
40
} catch {
41
41
}
42
- crvHandle . delete ( ) ;
43
42
} ) ;
44
43
if ( points . length > 0 ) {
45
44
points = this . vecHelper . removeAllDuplicateVectors ( points ) ;
@@ -454,7 +453,6 @@ export class OccHelper {
454
453
} else {
455
454
const edge = this . bRepBuilderAPIMakeEdge ( circle ) ;
456
455
if ( type === typeSpecificityEnum . edge ) {
457
- circle . delete ( ) ;
458
456
return edge ;
459
457
} else {
460
458
const circleWire = this . bRepBuilderAPIMakeWire ( edge ) ;
@@ -477,7 +475,6 @@ export class OccHelper {
477
475
} else {
478
476
const edge = this . bRepBuilderAPIMakeEdge ( ellipse ) ;
479
477
if ( type === typeSpecificityEnum . edge ) {
480
- ellipse . delete ( ) ;
481
478
return edge ;
482
479
} else {
483
480
const ellipseWire = this . bRepBuilderAPIMakeWire ( edge ) ;
@@ -620,7 +617,8 @@ export class OccHelper {
620
617
divideEdgeByParamsToPoints ( inputs : Inputs . OCCT . DivideDto < TopoDS_Edge > ) : Inputs . Base . Point3 [ ] {
621
618
const edge = inputs . shape ;
622
619
const { uMin, uMax } = this . getEdgeBounds ( edge ) ;
623
- const curve = this . getGeomCurveFromEdge ( edge , uMin , uMax ) ;
620
+ const wire = this . combineEdgesAndWiresIntoAWire ( { shapes : [ edge ] } ) ;
621
+ const curve = new this . occ . BRepAdaptor_CompCurve_2 ( wire , false ) ;
624
622
return this . divideCurveToNrSegments ( { ...inputs , shape : curve } , uMin , uMax ) ;
625
623
}
626
624
@@ -639,7 +637,6 @@ export class OccHelper {
639
637
const param = this . remap ( inputs . param , 0 , 1 , uMin , uMax ) ;
640
638
curve . D0 ( param , gpPnt ) ;
641
639
const pt : Base . Point3 = [ gpPnt . X ( ) , gpPnt . Y ( ) , gpPnt . Z ( ) ] ;
642
- curve . delete ( ) ;
643
640
gpPnt . delete ( ) ;
644
641
return pt ;
645
642
}
@@ -651,7 +648,6 @@ export class OccHelper {
651
648
const param = this . remap ( inputs . param , 0 , 1 , uMin , uMax ) ;
652
649
const vec = curve . DN ( param , 1 ) ;
653
650
const vector : Base . Vector3 = [ vec . X ( ) , vec . Y ( ) , vec . Z ( ) ] ;
654
- curve . delete ( ) ;
655
651
vec . delete ( ) ;
656
652
return vector ;
657
653
}
@@ -1222,26 +1218,29 @@ export class OccHelper {
1222
1218
1223
1219
startPointOnEdge ( inputs : Inputs . OCCT . ShapeDto < TopoDS_Edge > ) : Base . Point3 {
1224
1220
const edge = inputs . shape ;
1225
- const { uMin, uMax } = this . getEdgeBounds ( edge ) ;
1226
- const curve = this . getGeomCurveFromEdge ( edge , uMin , uMax ) ;
1227
- let res = this . startPointOnCurve ( { ...inputs , shape : curve } ) ;
1228
- curve . delete ( ) ;
1221
+ const wire = this . combineEdgesAndWiresIntoAWire ( { shapes : [ edge ] } ) ;
1222
+ let res = this . pointOnWireAtParam ( { shape : wire , param : 0 } ) ;
1223
+ return res ;
1224
+ }
1225
+
1226
+ endPointOnEdge ( inputs : Inputs . OCCT . ShapeDto < TopoDS_Edge > ) : Base . Point3 {
1227
+ const edge = inputs . shape ;
1228
+ const wire = this . combineEdgesAndWiresIntoAWire ( { shapes : [ edge ] } ) ;
1229
+ let res = this . pointOnWireAtParam ( { shape : wire , param : 1 } ) ;
1229
1230
return res ;
1230
1231
}
1231
1232
1232
1233
startPointOnWire ( inputs : Inputs . OCCT . ShapeDto < TopoDS_Wire > ) : Base . Point3 {
1233
1234
const wire = inputs . shape ;
1234
1235
const curve = new this . occ . BRepAdaptor_CompCurve_2 ( wire , false ) ;
1235
1236
let res = this . startPointOnCurve ( { ...inputs , shape : curve } ) ;
1236
- curve . delete ( ) ;
1237
1237
return res ;
1238
1238
}
1239
1239
1240
1240
endPointOnWire ( inputs : Inputs . OCCT . ShapeDto < TopoDS_Wire > ) : Base . Point3 {
1241
1241
const wire = inputs . shape ;
1242
1242
const curve = new this . occ . BRepAdaptor_CompCurve_2 ( wire , false ) ;
1243
1243
let res = this . endPointOnCurve ( { ...inputs , shape : curve } ) ;
1244
- curve . delete ( ) ;
1245
1244
return res ;
1246
1245
}
1247
1246
@@ -1267,8 +1266,6 @@ export class OccHelper {
1267
1266
const loc = edge . Location_1 ( ) ;
1268
1267
const crvHandle = this . occ . BRep_Tool . Curve_1 ( edge , loc , uMin , uMax ) ;
1269
1268
const curve = crvHandle . get ( ) ;
1270
- crvHandle . delete ( ) ;
1271
- loc . delete ( ) ;
1272
1269
return curve ;
1273
1270
}
1274
1271
0 commit comments