[MOAB-dev] r4743 - in MOAB/trunk: src src/moab test
iulian at mcs.anl.gov
iulian at mcs.anl.gov
Fri Apr 15 17:17:08 CDT 2011
Author: iulian
Date: 2011-04-15 17:17:06 -0500 (Fri, 15 Apr 2011)
New Revision: 4743
Modified:
MOAB/trunk/src/FBEngine.cpp
MOAB/trunk/src/moab/FBEngine.hpp
MOAB/trunk/test/mbfacet_test.cpp
Log:
the splitting geometry edge is created, but the new face not yet
Modified: MOAB/trunk/src/FBEngine.cpp
===================================================================
--- MOAB/trunk/src/FBEngine.cpp 2011-04-15 06:41:39 UTC (rev 4742)
+++ MOAB/trunk/src/FBEngine.cpp 2011-04-15 22:17:06 UTC (rev 4743)
@@ -1026,7 +1026,7 @@
return MB_SUCCESS;
}
-ErrorCode FBEngine::split_surface(EntityHandle face, std::vector<double> & xyz,
+ErrorCode FBEngine::split_surface_with_direction(EntityHandle face, std::vector<double> & xyz,
double * direction, EntityHandle & newFace)
{
@@ -1120,6 +1120,7 @@
// otherwise, we have a trimming line for splitting
Range triToDelete;
+ Range edgesToDelete;
ErrorCode rval;
bool loop = false;
if (fabs(points[0] - points[3 * num_points - 3]) < tolerance_segment && fabs(
@@ -1143,8 +1144,9 @@
rval = _mbImpl->create_vertex(coord_vert, newVertex);
MBERRORR(rval, "can't create vertex");
nodesAlongPolyline.push_back(newVertex);// first node on polyline
+ edgesToDelete.insert(entities[0]);
} else {
- // interior of triangle not supported , but we should easily
+ // interior of triangle not supported yet, but we will eventually
MBERRORR(MB_FAILURE, "can't start in an interior of a triangle (we could though)");
}
for (int i = 0; i < num_points-1; i++) {
@@ -1209,7 +1211,8 @@
rval = BreakTriangle( tri, e1, e3, nodesAlongPolyline[i], nodesAlongPolyline[i+1],
nodesAlongPolyline[i+2]);// nodesAlongPolyline are on entities!
MBERRORR(rval, "can't break triangle");
-
+ if (et3==MBEDGE)
+ edgesToDelete.insert(e3);
}
else
{
@@ -1220,25 +1223,153 @@
}
rval = BreakTriangle2( tri, e1, e2, nodesAlongPolyline[i], nodesAlongPolyline[i+1]);
MBERRORR(rval, "can't break triangle 2");
+ if (et2==MBEDGE)
+ edgesToDelete.insert(e2);
}
triToDelete.insert(tri);
More information about the moab-dev
mailing list