3810 uint64_t i, nedges, nfaces, fields;
3816 int nedge_right = 0;
3823 int fnode_edges = 0;
3825 int lnode_edges = 0;
3834 LWDEBUGF(1,
"lwt_be_getEdgeById returned NULL and set i=%d", i);
3835 if (i == UINT64_MAX)
3848 "Backend coding error: getEdgeById callback returned NULL "
3849 "but numelements output parameter has value %d "
3850 "(expected 0 or 1)",
3863 LWDEBUG(1,
"Updating next_{right,left}_face of ring edges...");
3871 node_ids[nedges++] = edge->
end_node;
3877 if (nedges == UINT64_MAX)
3882 nedge_left = nedge_right = 0;
3883 for ( i=0; i<nedges; ++i )
3886 if ( e->
edge_id == edge_id )
continue;
3924 LWDEBUGF(1,
"updating %d 'next_left' edges", nedge_left);
3937 LWDEBUGF(1,
"updating %d 'next_right' edges", nedge_right);
3948 LWDEBUGF(1,
"releasing %d updateable edges in %p", nedges, upd_edge);
3966 LWDEBUG(1,
"floodface is universe");
3980 if (nfaces == UINT64_MAX)
3987 for ( i=0; i<nfaces; ++i )
3989 if ( faces[i].face_id == edge->
face_left )
3991 if ( ! box1 ) box1 = faces[i].
mbr;
3997 lwerror(
"corrupted topology: more than 1 face have face_id=%"
4002 else if ( faces[i].face_id == edge->
face_right )
4004 if ( ! box2 ) box2 = faces[i].
mbr;
4010 lwerror(
"corrupted topology: more than 1 face have face_id=%"
4020 lwerror(
"Backend coding error: getFaceById returned face "
4029 lwerror(
"corrupted topology: no face have face_id=%"
4038 lwerror(
"corrupted topology: no face have face_id=%"
4059 lwerror(
"Unexpected error: %d faces updated when expecting 1", i);
4078 lwerror(
"Unexpected error: %d faces inserted when expecting 1", result);
4143 if ( ! fnode_edges )
4185 return modFace ? floodface : newface.
face_id;
int gbox_merge(const GBOX *new_box, GBOX *merge_box)
Update the merged GBOX to be large enough to include itself and the new box.
LWT_INT64 LWT_ELEMID
Identifier of topology element.
#define LWT_COL_EDGE_START_NODE
#define LWT_COL_EDGE_NEXT_RIGHT
#define LWT_COL_NODE_CONTAINING_FACE
#define LWT_COL_EDGE_EDGE_ID
Edge fields.
#define LWT_COL_EDGE_END_NODE
#define LWT_COL_EDGE_NEXT_LEFT
#define LWDEBUG(level, msg)
#define LWDEBUGF(level, msg,...)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
static uint64_t lwt_be_updateFacesById(LWT_TOPOLOGY *topo, const LWT_ISO_FACE *faces, uint64_t numfaces)
const char * lwt_be_lastErrorMessage(const LWT_BE_IFACE *be)
static int lwt_be_deleteFacesById(const LWT_TOPOLOGY *topo, const LWT_ELEMID *ids, uint64_t numelems)
static int lwt_be_checkTopoGeomRemEdge(LWT_TOPOLOGY *topo, LWT_ELEMID edge_id, LWT_ELEMID face_left, LWT_ELEMID face_right)
LWT_ISO_EDGE * lwt_be_getEdgeById(LWT_TOPOLOGY *topo, const LWT_ELEMID *ids, uint64_t *numelems, int fields)
static int _lwt_UpdateEdgeFaceRef(LWT_TOPOLOGY *topo, LWT_ELEMID of, LWT_ELEMID nf)
static LWT_ISO_EDGE * lwt_be_getEdgeByNode(LWT_TOPOLOGY *topo, const LWT_ELEMID *ids, uint64_t *numelems, int fields)
static int lwt_be_updateNodesById(LWT_TOPOLOGY *topo, const LWT_ISO_NODE *nodes, int numnodes, int upd_fields)
static int lwt_be_updateTopoGeomFaceHeal(LWT_TOPOLOGY *topo, LWT_ELEMID face1, LWT_ELEMID face2, LWT_ELEMID newface)
static int lwt_be_insertFaces(LWT_TOPOLOGY *topo, LWT_ISO_FACE *face, uint64_t numelems)
int lwt_be_deleteEdges(LWT_TOPOLOGY *topo, const LWT_ISO_EDGE *sel_edge, int sel_fields)
static int _lwt_UpdateNodeFaceRef(LWT_TOPOLOGY *topo, LWT_ELEMID of, LWT_ELEMID nf)
static void _lwt_release_faces(LWT_ISO_FACE *faces, int num_faces)
static LWT_ISO_FACE * lwt_be_getFaceById(LWT_TOPOLOGY *topo, const LWT_ELEMID *ids, uint64_t *numelems, int fields)
static void _lwt_release_edges(LWT_ISO_EDGE *edges, int num_edges)
static int lwt_be_updateEdgesById(LWT_TOPOLOGY *topo, const LWT_ISO_EDGE *edges, int numedges, int upd_fields)
LWT_ELEMID containing_face
const LWT_BE_IFACE * be_iface