<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Evan, <br>
<br>
Spot on. We got it working after adjusting the cubit flag to
TORUS_SURFACE_TYPE. <br>
<br>
Seems like this is a problem from 13.1 on as I had the same issue in
Cubit 14.... <br>
<br>
<br>
Cheers, <br>
<br>
Patrick <br>
<br>
<div class="moz-cite-prefix">On 07/28/15 11:21, Vander Zee, Evan B.
wrote:<br>
</div>
<blockquote
cite="mid:553D5F34658FB846ACEA00D6140EAC689676F1D0@PAYTON.anl.gov"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Andy,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">I
reproduced your problem using a version of CGM that I built
on Cubit13.1. After some experimentation, I think that the
problem is that the GeometryType is off by one in CGMA from
what the Cubit library expects. I got successful RefFaces
when passing arguments CONE_SURFACE_TYPE (which I am
guessing is interpreted as the one-later enum value
PLANE_SURFACE_TYPE) and TORUS_SURFACE_TYPE (which I am
guessing is interpreted as the one-later enum value
BEST_FIT_SURFACE_TYPE).<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">We
ought to fix the off-by-one error, but for now just the
information I’ve given will probably help you with whatever
you are doing.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">I’m
not sure which value would have to be removed/renumbered to
get CGMA to agree with Cubit. Is anyone else familiar with
the GeometryType enumeration? I’m just making my best guess
here . . .<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">-Evan<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
Vander Zee, Evan B.
<br>
<b>Sent:</b> Monday, July 27, 2015 4:48 PM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:cgma-dev@mcs.anl.gov">cgma-dev@mcs.anl.gov</a><br>
<b>Cc:</b> Patrick Shriwise; 'Andrew Davis'<br>
<b>Subject:</b> RE: [cgma-dev] Why can't I create
surfaces from curves<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">It
is a little hard to tell exactly what you are trying to do,
but it looks like you are trying to create a circular patch
in the y-z plane. I tried running the code you provided
with OCC geometry engine, and I got no errors.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Some
things you could try would be giving more than two edges and
linking edges better in a loop, i.e., making sure that the
end vertex of one edge is the beginning vertex of the next.
I planned to try these, but my only successful build of CGM
with acis so far is a cmake build, and I’m still a novice in
the cmake build system, so I didn’t get far enough to
reproduce the problem. What version are you using?<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif"">-Evan<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
<a moz-do-not-send="true"
href="mailto:cgma-dev-bounces@mcs.anl.gov">cgma-dev-bounces@mcs.anl.gov</a>
[<a moz-do-not-send="true"
href="mailto:cgma-dev-bounces@mcs.anl.gov">mailto:cgma-dev-bounces@mcs.anl.gov</a>]
<b>On Behalf Of </b>Andrew Davis<br>
<b>Sent:</b> Monday, July 27, 2015 10:01 AM<br>
<b>To:</b> Patrick Shriwise<br>
<b>Cc:</b> Andrew Davis; <a moz-do-not-send="true"
href="mailto:cgma-dev@mcs.anl.gov">cgma-dev@mcs.anl.gov</a><br>
<b>Subject:</b> Re: [cgma-dev] Why can't I create surfaces
from curves<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi Patrick<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Irrespective of whether or not I use
planar, best fit, sphere, its the same error message over
and over again.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Andy<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Sat, Jul 25, 2015 at 8:00 AM,
Patrick Shriwise <<a moz-do-not-send="true"
href="mailto:shriwise@wisc.edu" target="_blank">shriwise@wisc.edu</a>>
wrote:<o:p></o:p></p>
<div>
<p class="MsoNormal">Hey Andy, <br>
<br>
The error message seems to indicate it's trying to make
a surface which isn't planar.. maybe thats a good
starting point? Are there other flags to hand that
function by chance?<br>
<br>
Cheers, <br>
<br>
Patrick <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 07/23/2015 02:34 PM, Andrew
Davis wrote:<o:p></o:p></p>
</div>
<blockquote
style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">Hi Guys <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I have the following
function that I've added to my version of
iGeom,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">ITAPS_API void<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">iGeom_createSurface2(iGeom_Instance
instance,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> /*in*/
iBase_EntityHandle *input_curves,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> /*in*/ int num_curves,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> /*out*/
iBase_EntityHandle *geom_entity,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> int*
err)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">{<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> CubitVector p1(0, 0,
5);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> RefVertex* v1 =
gmt->make_RefVertex(p1);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> CubitVector p2(0, 0,
-5);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> RefVertex* v2 =
gmt->make_RefVertex(p2);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> CubitVector p3(0, 5,
0);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> RefVertex* v3 =
gmt->make_RefVertex(p3);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> CubitVector p4(0, -5,
0);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> RefVertex* v4 =
gmt->make_RefVertex(p4);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> RefEdge* e1 =
gmt->make_RefEdge(ARC_CURVE_TYPE,v1,v2,&p3);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> RefEdge* e2 =
gmt->make_RefEdge(ARC_CURVE_TYPE,v1,v2,&p4);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> DLIList<RefEdge*>
curves;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> curves.insert(e1);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> curves.insert(e2);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> RefFace* tmp_surface =
gmt->make_RefFace(PLANE_SURFACE_TYPE,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> curves,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> false);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> *geom_entity =
reinterpret_cast<iBase_EntityHandle>(tmp_surface);
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> RETURN ((tmp_surface ?
iBase_SUCCESS : iBase_FAILURE));<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">}<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">When I run this, I can
sucessfully create the vertices, and create
curves from those verts using make_RefEdge.
When I try to create a surface from those
two ref edges I get the following error.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">WARNING: In
AcisGeometryEngine::make_FACE<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> At this time,
cannot make a FACE that isn't planar or
best fit.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">ERROR: In
AcisModifyEngine::make_Surface<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> Cannot make
Surface object.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">ERROR: Couldn't make
new RefFace.<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">If I save the file as
acis and examine the results in Cubit, they
appear as they should (minus the surface). I
can, in Cubit, make surface then, sweep and
do all the operations that I want to.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Is there something that
I', just misunderstanding about CGM / gmt
that means I'm using this wrong?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Andy<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</blockquote>
<br>
</body>
</html>