Skip to content

Commit 030895e

Browse files
committed
fixes
1 parent 6bc4b12 commit 030895e

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

OCCUtils/Construct.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ def make_solid(*args):
206206
sld = BRepBuilderAPI_MakeSolid(*args)
207207
with assert_isdone(sld, 'failed to produce solid'):
208208
result = sld.Solid()
209-
sld.Delete()
210209
return result
211210

212211

@@ -216,7 +215,6 @@ def make_shell(*args):
216215
st = ShapeToTopology()
217216
with assert_isdone(shell, 'failed to produce shell'):
218217
result = shell.Shell()
219-
shell.Delete()
220218
return st(result)
221219

222220

@@ -225,7 +223,6 @@ def make_face(*args):
225223
face = BRepBuilderAPI_MakeFace(*args)
226224
with assert_isdone(face, 'failed to produce face'):
227225
result = face.Face()
228-
face.Delete()
229226
return result
230227

231228

@@ -234,7 +231,6 @@ def make_edge2d(*args):
234231
edge = BRepBuilderAPI_MakeEdge2d(*args)
235232
with assert_isdone(edge, 'failed to produce edge'):
236233
result = edge.Edge()
237-
edge.Delete()
238234
return result
239235

240236

@@ -243,7 +239,6 @@ def make_edge(*args):
243239
edge = BRepBuilderAPI_MakeEdge(*args)
244240
with assert_isdone(edge, 'failed to produce edge'):
245241
result = edge.Edge()
246-
edge.Delete()
247242
return result
248243

249244

@@ -252,10 +247,8 @@ def make_vertex(*args):
252247
vert = BRepBuilderAPI_MakeVertex(*args)
253248
with assert_isdone(vert, 'failed to produce vertex'):
254249
result = vert.Vertex()
255-
vert.Delete()
256250
return result
257251

258-
259252
@wraps(BRepBuilderAPI_MakeWire)
260253
def make_wire(*args):
261254
# if we get an iterable, than add all edges to wire builder
@@ -580,7 +573,6 @@ def add_wire_to_face(face, wire, reverse=False):
580573
wire.Reverse()
581574
face.Add(wire)
582575
result = face.Face()
583-
face.Delete()
584576
return result
585577

586578

OCCUtils/Topology.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ def _map_shapes_and_ancestors(self, topoTypeA, topoTypeB, topologicalEntity):
309309
_map = TopTools_IndexedDataMapOfShapeListOfShape()
310310
topexp_MapShapesAndAncestors(self.myShape, topoTypeA, topoTypeB, _map)
311311
results = _map.FindFromKey(topologicalEntity)
312-
if results.IsEmpty():
312+
if results.Size() == 0:
313313
yield None
314314

315315
topology_iterator = TopTools_ListIteratorOfListOfShape(results)
@@ -347,7 +347,7 @@ def _number_shapes_ancestors(self, topoTypeA, topoTypeB, topologicalEntity):
347347
_map = TopTools_IndexedDataMapOfShapeListOfShape()
348348
topexp_MapShapesAndAncestors(self.myShape, topoTypeA, topoTypeB, _map)
349349
results = _map.FindFromKey(topologicalEntity)
350-
if results.IsEmpty():
350+
if results.Size() == 0:
351351
return None
352352
topology_iterator = TopTools_ListIteratorOfListOfShape(results)
353353
while topology_iterator.More():

0 commit comments

Comments
 (0)