<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
</head>
<body>
<div name="messageBodySection">
<div dir="auto">Thanks Max,
<div dir="auto"><br>
</div>
<div dir="auto">That worked fine. I don’t know why I didn’t see it.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Regards,</div>
<div dir="auto"><br>
</div>
<div dir="auto">Peter.</div>
</div>
</div>
<div name="messageSignatureSection"><br>
<div class="matchFont">---------------------------------------------------------------------<br>
<br>
Associate Professor Peter Johnston (FAustMS, FIMA)<br>
School of Environment and Science<br>
Griffith University | Nathan | QLD 4111 | Technology (N44) Room 3.19<br>
T +61 7 373 57748| F +61 7 373 57656 Email p.johnston@griffith.edu.au</div>
</div>
<div name="messageReplySection">On 1 Oct 2019, 4:40 AM +1000, Max Orok <morok@mevex.com>, wrote:<br>
<blockquote type="cite" class="spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;">
<div dir="ltr">
<div>Hi Peter,<br>
</div>
<div><br>
</div>
<div>I think you can use the <span style="font-family:monospace">getValue <font face="arial,sans-serif">
function for this.</font></span></div>
<div><span style="font-family:monospace"><font face="arial,sans-serif">Here's a short example that looks up the coordinates of a translated point:<br>
</font></span></div>
<div><span style="font-family:monospace"><font face="arial,sans-serif"><br>
</font></span></div>
<div><span style="font-family:monospace">import gmsh<br>
<br>
gmsh.initialize()<br>
<br>
p1 = gmsh.model.occ.addPoint(0, 0, 0)<br>
gmsh.model.occ.translate([(0, p1)], 1.0, 1.0, 1.0)<br>
<br>
# need to synchronize before looking up the point<br>
gmsh.model.occ.synchronize()<br>
<br>
no_parametrization = []<br>
[x, y, z] = gmsh.model.getValue(0, p1, no_parametrization)<br>
</span></div>
<div><br>
</div>
<div><font face="monospace"># will print 1.0, 1.0, 1.0</font><br>
</div>
<div><span style="font-family:monospace"></span></div>
<div><span style="font-family:monospace">print("x: {}, y: {}, z: {}".format(x, y, z))<br>
<br>
gmsh.finalize()<font face="arial,sans-serif"><br>
</font></span></div>
<div><span style="font-family:monospace"><font face="arial,sans-serif"><br>
</font></span></div>
<div><span style="font-family:monospace"><font face="arial,sans-serif">I hope this helps!<br>
</font></span></div>
<div><span style="font-family:monospace"><font face="arial,sans-serif">Max<br>
</font></span></div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Sep 30, 2019 at 2:27 AM Peter Johnston <<a href="mailto:p.johnston@griffith.edu.au">p.johnston@griffith.edu.au</a>> wrote:<br>
</div>
<blockquote class="gmail_quote spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #e67e22;">
<div>
<div name="messageBodySection">
<div dir="auto">Hello,
<div dir="auto"><br>
</div>
<div dir="auto">My apologies if this is a dumb question, but I am having difficulty working out how to find the coordinates of a transformed point in the python api.</div>
<div dir="auto"><br>
</div>
<div dir="auto">I have created a point with:</div>
<div dir="auto"><br>
</div>
<div dir="auto">apex_pt = gmsh.model.occ.addPoint(a_epi,0.0,0.0,0,-1)<br>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">and transform it (translate and rotate) with a routine that I wrote:</div>
<div dir="auto"><br>
</div>
<div dir="auto">transform([0,apex_pt])<br>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">Having inspected the geometry and mesh, I know that the transformation puts the point in the correct position. However, I cannot work out how to find the coordinates of the new point. I have tried using getEntities (for dimension 0 entities)
and getNodes for each entity returned, but this does not work for the one particular entity which is my apex_pt.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Any help would be much appreciated.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Thanks,</div>
<div dir="auto"><br>
</div>
<div dir="auto">Peter.</div>
</div>
</div>
<div name="messageSignatureSection"><br>
<div class="gmail-m_-8117077443373161959matchFont">---------------------------------------------------------------------<br>
<br>
Associate Professor Peter Johnston (FAustMS, FIMA)<br>
School of Environment and Science<br>
Griffith University | Nathan | QLD 4111 | Technology (N44) Room 3.19<br>
T +61 7 373 57748| F +61 7 373 57656 Email <a href="mailto:p.johnston@griffith.edu.au" target="_blank">
p.johnston@griffith.edu.au</a></div>
</div>
</div>
_______________________________________________<br>
gmsh mailing list<br>
<a href="mailto:gmsh@onelab.info" target="_blank">gmsh@onelab.info</a><br>
<a href="http://onelab.info/mailman/listinfo/gmsh" rel="noreferrer" target="_blank">http://onelab.info/mailman/listinfo/gmsh</a><br>
</blockquote>
</div>
<br clear="all">
<br>
--<br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>Max Orok</div>
<div>Contractor<br>
</div>
</div>
<div dir="ltr"><a href="http://www.mevex.com" target="_blank">www.mevex.com</a><br>
<br>
<img src="https://docs.google.com/uc?export=download&id=1fHTIiW4OMUjQr1iOkspQ7wiEsxunoOs0&revid=0B6x5w-5zVaEjSkpwbm5oY29jbG1XMzJoYldXTmJpNGFtb3dVPQ" width="164" height="42"><br>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</body>
</html>