[cgma-dev] Why can't I create surfaces from curves

Vander Zee, Evan B. vanderzee at anl.gov
Mon Jul 27 16:48:01 CDT 2015


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.

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?

-Evan

From: cgma-dev-bounces at mcs.anl.gov [mailto:cgma-dev-bounces at mcs.anl.gov] On Behalf Of Andrew Davis
Sent: Monday, July 27, 2015 10:01 AM
To: Patrick Shriwise
Cc: Andrew Davis; cgma-dev at mcs.anl.gov
Subject: Re: [cgma-dev] Why can't I create surfaces from curves

Hi Patrick

Irrespective of whether or not I use planar, best fit, sphere, its the same error message over and over again.

Thanks

Andy

On Sat, Jul 25, 2015 at 8:00 AM, Patrick Shriwise <shriwise at wisc.edu<mailto:shriwise at wisc.edu>> wrote:
Hey Andy,

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?

Cheers,

Patrick

On 07/23/2015 02:34 PM, Andrew Davis wrote:
Hi Guys

I have the following function that I've added to my version of iGeom,

ITAPS_API void
iGeom_createSurface2(iGeom_Instance instance,
   /*in*/ iBase_EntityHandle *input_curves,
   /*in*/ int num_curves,
   /*out*/ iBase_EntityHandle *geom_entity,
                    int* err)
{
  CubitVector p1(0, 0, 5);
  RefVertex* v1 = gmt->make_RefVertex(p1);

  CubitVector p2(0, 0, -5);
  RefVertex* v2 = gmt->make_RefVertex(p2);

  CubitVector p3(0, 5, 0);
  RefVertex* v3 = gmt->make_RefVertex(p3);

  CubitVector p4(0, -5, 0);
  RefVertex* v4 = gmt->make_RefVertex(p4);

  RefEdge* e1 = gmt->make_RefEdge(ARC_CURVE_TYPE,v1,v2,&p3);
  RefEdge* e2 = gmt->make_RefEdge(ARC_CURVE_TYPE,v1,v2,&p4);

  DLIList<RefEdge*> curves;
  curves.insert(e1);
  curves.insert(e2);

  RefFace* tmp_surface =  gmt->make_RefFace(PLANE_SURFACE_TYPE,
   curves,
   false);

  *geom_entity = reinterpret_cast<iBase_EntityHandle>(tmp_surface);
  RETURN ((tmp_surface ? iBase_SUCCESS : iBase_FAILURE));
}

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.

WARNING: In AcisGeometryEngine::make_FACE
         At this time, cannot make a FACE that isn't planar or best fit.
ERROR: In AcisModifyEngine::make_Surface
       Cannot make Surface object.
ERROR: Couldn't make new RefFace.

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.

Is there something that I', just misunderstanding about CGM / gmt that means I'm using this wrong?

Thanks

Andy





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/cgma-dev/attachments/20150727/e3e8441a/attachment.html>


More information about the cgma-dev mailing list