Skip to content

Commit

Permalink
Update 11_solder_ball.py
Browse files Browse the repository at this point in the history
  • Loading branch information
waltersma authored Sep 23, 2024
1 parent 5f07fa0 commit 70b00f0
Showing 1 changed file with 22 additions and 26 deletions.
48 changes: 22 additions & 26 deletions examples/gallery/11_solder_ball.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@
import tempfile

import ansys.meshing.prime as prime

# from ansys.meshing.prime.graphics import PrimePlotter
from ansys.meshing.prime.graphics import PrimePlotter

###############################################################################
# Launch Ansys Prime Server
Expand Down Expand Up @@ -100,11 +99,12 @@

# Display the model without the infill so the cylindrical geometry of the solder
# is visible.
# display = PrimePlotter()
# display.plot(
# model, scope=prime.ScopeDefinition(model=model, label_expression="solder_cyl*,pad*,layer*")
# )
# display.show()

display = PrimePlotter()
display.plot(
model, scope=prime.ScopeDefinition(model=model, label_expression="solder_cyl*,pad*,layer*")
)
display.show()

###############################################################################
# Connect geometry
Expand Down Expand Up @@ -143,9 +143,9 @@
)
scaffolder.merge_overlapping_topo_faces(merged_part.get_topo_faces(), params)

# display = PrimePlotter()
# display.plot(model)
# display.show()
display = PrimePlotter()
display.plot(model, update=True)
display.show()

###############################################################################
# Volume sweeper
Expand Down Expand Up @@ -195,9 +195,9 @@

prime.lucid.Mesh(model).surface_mesh(min_size=0.2, scope=base_scope, generate_quads=True)

# display = PrimePlotter()
# display.plot(model)
# display.show()
display = PrimePlotter()
display.plot(model, update=True)
display.show()

stackbase_results = sweeper.stack_base_face(
part_id=merged_part.id,
Expand All @@ -213,9 +213,9 @@
merged_part._print_mesh = True
print(merged_part)

# display = PrimePlotter()
# display.plot(model)
# display.show()
display = PrimePlotter()
display.plot(model, update=True)
display.show()

###############################################################################
# Import sphere geometry for match morphing
Expand All @@ -232,9 +232,9 @@
imported_cad_part_ids = [part.id for part in model.parts if part.get_topo_faces()]
target_part = model.get_part(imported_cad_part_ids[0])

# display = PrimePlotter()
# display.plot(model, scope=prime.ScopeDefinition(model, part_expression=target_part.name))
# display.show()
display = PrimePlotter()
display.plot(model, scope=prime.ScopeDefinition(model, part_expression=target_part.name))
display.show()

print(model)

Expand Down Expand Up @@ -350,13 +350,9 @@

model.delete_parts([target_part.id])

# display = PrimePlotter()
# display.plot(model)
# display.show()

# display = PrimePlotter()
# display.plot(model, scope=prime.ScopeDefinition(model=model, label_expression="solder*"))
# display.show()
display = PrimePlotter()
display.plot(model, scope=prime.ScopeDefinition(model=model, label_expression="solder*"), update=True)
display.show()

###############################################################################
# Export mesh
Expand Down

0 comments on commit 70b00f0

Please sign in to comment.