[cgma-dev] Why can't I create surfaces from curves
Andrew Davis
andrew.davis at wisc.edu
Thu Jul 23 14:34:23 CDT 2015
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/20150723/924ce941/attachment.html>
More information about the cgma-dev
mailing list