<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 27 Apr 2018, at 08:52, andrew <<a href="mailto:armitatz@gmail.com" class="">armitatz@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-size:small">Hi,</div><div class="gmail_default" style="font-size:small">thank you for your reply.</div><div class="gmail_default" style="font-size:small">I downloaded gmsh-3.0.7-
<span style="color:rgb(46,46,46);font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:center;text-indent:0px;text-transform:none;white-space:nowrap;word-spacing:0px;background-color:rgb(250,250,250);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline" class="">dcaabc7b and I saw in the gmsh.cpp the following code</span></div><div class="gmail_default" style="text-align:left;font-size:small"><span style="color:rgb(46,46,46);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:center;text-indent:0px;text-transform:none;white-space:nowrap;word-spacing:0px;background-color:rgb(250,250,250);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline" class=""><font face="arial, helvetica, sans-serif" class=""><br class=""></font></span></div><div class="gmail_default" style="font-size:small"><span style="color:rgb(46,46,46);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:center;text-indent:0px;text-transform:none;white-space:nowrap;word-spacing:0px;background-color:rgb(250,250,250);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline" class=""><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class="">GMSH_API void gmsh::model::getType(const int dim,</font></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class=""> const int tag,</font></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class=""> std::string &type)</font></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class="">{</font></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class=""> if(!_isInitialized()){ throw -1; }</font></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class=""> GEntity *ge = GModel::current()->getEntityByTag(dim, tag);</font></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class=""> if(!ge){</font></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class=""> Msg::Error("%s does not exist", _getEntityName(dim, tag).c_str());</font></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class=""> throw 2;</font></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class=""> }</font></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class=""> type = ge->getTypeString();</font></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class="">}</font></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class=""><br class=""></font></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class="">I tried to use the code to a geo script like</font></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class=""><br class=""></font></div></span></div></div></div></blockquote><div><br class=""></div><div>This new function is in the C++/C/Python API - not yet in the .geo file language.</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-size:small"><span style="color:rgb(46,46,46);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:center;text-indent:0px;text-transform:none;white-space:nowrap;word-spacing:0px;background-color:rgb(250,250,250);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline" class=""><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class="">L[]= "*";</font></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class=""><br class=""></font></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class="">tp="";</font></div><div class="gmail_default" style="text-align:left;font-size:small"><br class=""></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class="">getType(1,L[0],tp);</font></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class=""><br class=""></font></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class="">but I get errors. How can I use it for getting the type in to the tp variable? I also tried different syntaxes but I always get errors.</font></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class=""><br class=""></font></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class="">kind regards</font></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class=""><br class=""></font></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class="">andrew</font></div><div class="gmail_default" style="text-align:left;font-size:small"><font face="arial, helvetica, sans-serif" class=""><br class=""></font></div><div style="font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace" class=""><br class=""></div></span></div><div class="gmail_default" style="font-size:small"><span style="color:rgb(46,46,46);font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:center;text-indent:0px;text-transform:none;white-space:nowrap;word-spacing:0px;background-color:rgb(250,250,250);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline" class=""><br class=""></span></div><div class="gmail_extra"><br class=""><div class="gmail_quote">2018-04-26 11:01 GMT+03:00 Christophe Geuzaine <span dir="ltr" class=""><<a href="mailto:geuzaine@gmail.com" target="_blank" class="">geuzaine@gmail.com</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space" class=""><br class=""><div class=""><span class=""><br class=""><blockquote type="cite" class=""><div class="">On 25 Apr 2018, at 22:29, Christophe Geuzaine <<a href="mailto:geuzaine@gmail.com" target="_blank" class="">geuzaine@gmail.com</a>> wrote:</div><br class="m_2961845578942865855Apple-interchange-newline"><div class=""><div style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><br class=""></div>Hi Andrew,<div class=""><br class=""></div><div class="">Not in the current version. This is something we might indeed want to add in the API.</div></div></div></blockquote><div class=""><br class=""></div></span><div class="">I've added gmsh::model::getType() which return the string type of an entity ("Circle", etc.) - this could be used to filter the results.</div><span class="HOEnZb"><font color="#888888" class=""><div class=""><br class=""></div><div class="">Christophe</div></font></span><span class=""><div class=""><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><br class=""></div><div class="">Christophe<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 25 Apr 2018, at 17:57, andrew <<a href="mailto:armitatz@gmail.com" target="_blank" class="">armitatz@gmail.com</a>> wrote:</div><br class="m_2961845578942865855Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div style="font-size:small" class="">Hi,</div><div style="font-size:small" class=""><br class=""></div><div style="font-size:small" class="">I would like to select in a model all the arcs that are in a surface. For example if I use the line</div><div style="font-size:small" class=""><br class=""></div><div style="font-size:small" class="">lines[]=Line "*";</div><div style="font-size:small" class=""><br class=""></div><div style="font-size:small" class="">I get all the lines in a model. Is there a similar </div><div style="font-size:small" class=""><br class=""></div><div style="font-size:small" class="">circles[]=Circle "*"; or arcs[]=Arc "*";</div><div style="font-size:small" class=""><br class=""></div><div style="font-size:small" class="">command with I will be able to select the circular elements?</div><div style="font-size:small" class=""><br class=""></div><div style="font-size:small" class="">thank you in advance</div><div style="font-size:small" class=""><br class=""></div><div style="font-size:small" class="">andrew</div><div style="font-size:small" class=""><br class=""></div></div>
______________________________<wbr class="">_________________<br class="">gmsh mailing list<br class=""><a href="mailto:gmsh@onelab.info" target="_blank" class="">gmsh@onelab.info</a><br class=""><a href="http://onelab.info/mailman/listinfo/gmsh" target="_blank" class="">http://onelab.info/mailman/<wbr class="">listinfo/gmsh</a><br class=""></div></blockquote></div><br class=""></div></div></div></blockquote></span></div><br class=""></div></blockquote></div><br class=""></div></div>
_______________________________________________<br class="">gmsh mailing list<br class=""><a href="mailto:gmsh@onelab.info" class="">gmsh@onelab.info</a><br class="">http://onelab.info/mailman/listinfo/gmsh<br class=""></div></blockquote></div><br class=""></body></html>