Skip to content

Commit

Permalink
Merge pull request #2631 from firedrakeproject/rckirby/fix-ocmh-complex
Browse files Browse the repository at this point in the history
Append .real to coordinates in OCMH, just in case we're in complex mode
  • Loading branch information
dham authored Nov 17, 2022
2 parents 7dd4ad4 + 3097007 commit 146397a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions firedrake/mg/opencascade_mh.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def project_mesh_to_cad_3d(mesh, cad):
surf = BRepAdaptor_Surface(face)

for node in owned_nodes:
pt = gp_Pnt(*coorddata[node, :])
pt = gp_Pnt(*coorddata[node, :].real)

proj = GeomAPI_ProjectPointOnSurf(pt, surf.Surface().Surface())
if proj.NbPoints() > 0:
Expand Down Expand Up @@ -186,7 +186,7 @@ def project_mesh_to_cad_3d(mesh, cad):
continue

for node in intersecting_nodes:
pt = gp_Pnt(*coorddata[node, :])
pt = gp_Pnt(*coorddata[node, :].real)

projections = []
for edge in intersecting_edges:
Expand Down Expand Up @@ -226,7 +226,7 @@ def project_mesh_to_cad_2d(mesh, cad):
curve = BRepAdaptor_Curve(edge)

for node in owned_nodes:
pt = gp_Pnt(*coorddata[node, :], 0)
pt = gp_Pnt(*coorddata[node, :].real, 0)
proj = GeomAPI_ProjectPointOnCurve(pt, curve.Curve().Curve())
if proj.NbPoints() > 0:
projpt = proj.NearestPoint()
Expand Down

0 comments on commit 146397a

Please sign in to comment.