[MOAB-dev] r5334 - MOAB/trunk/src
iulian at mcs.anl.gov
iulian at mcs.anl.gov
Sat Jan 21 22:50:31 CST 2012
Author: iulian
Date: 2012-01-21 22:50:31 -0600 (Sat, 21 Jan 2012)
New Revision: 5334
Modified:
MOAB/trunk/src/FBEngine.cpp
Log:
Mesh-Based geometry only:
weaving the lateral faces is now working even if the bottom and top edges are
not straight in the cutting plane.
This feature is needed in MeshKit, when consecutive edges are chained to
minimize the number of topological features.
Modified: MOAB/trunk/src/FBEngine.cpp
===================================================================
--- MOAB/trunk/src/FBEngine.cpp 2012-01-20 20:46:09 UTC (rev 5333)
+++ MOAB/trunk/src/FBEngine.cpp 2012-01-22 04:50:31 UTC (rev 5334)
@@ -3265,49 +3265,100 @@
MBERRORR(rval, "can't create new lateral face");
EntityHandle v[4]; // vertex sets
- EntityHandle nd[4]; // actual nodes
// bot edge will be v1->v2
// top edge will be v3->v4
- // wee need to create edges from v1 to v3 and from v2 to v4
+ // we need to create edges from v1 to v3 and from v2 to v4
std::vector<EntityHandle> adj;
rval = _mbImpl->get_child_meshsets(bEdge, adj);
MBERRORR(rval, "can't get children nodes");
- if (adj.size()!=2)
- MBERRORR(MB_FAILURE, " edge does not have 2 vertices ");
- int sense;
- v[0]=adj[0];
- v[1]=adj[1];
- rval = getEgVtxSense( bEdge, v[0], v[1], sense );
- MBERRORR(rval, "can't get edge sense");
- if (-1==sense)
+ bool periodic = false;
+ if (adj.size()==1)
{
- v[1]=adj[0];
+ v[0] = v[1] = adj[0];
+ periodic = true;
+ }
+ else
+ {
+ v[0]=adj[0];
+ v[1]=adj[1];
+ }
+ int senseB;
+ rval = getEgVtxSense( bEdge, v[0], v[1], senseB );
+ MBERRORR(rval, "can't get bottom edge sense");
+ if (-1==senseB)
+ {
+ v[1]=adj[0];// so , bEdge will be oriented from v[0] to v[1], and will start at nodes1, coords1..
v[0]=adj[1];
}
adj.clear();
rval = _mbImpl->get_child_meshsets(tEdge, adj);
MBERRORR(rval, "can't get children nodes");
- if (adj.size()!=2)
- MBERRORR(MB_FAILURE, " top edge does not have 2 vertices ");
- v[2]=adj[0];
- v[3]=adj[1];
More information about the moab-dev
mailing list