3978 uint64_t i, nedges, nfaces, fields;
3984 int nedge_right = 0;
3991 int fnode_edges = 0;
3993 int lnode_edges = 0;
4003 LWDEBUGF(1,
"lwt_be_getEdgeById returned NULL and set i=%llu", i);
4004 if (i == UINT64_MAX)
4017 "Backend coding error: getEdgeById callback returned NULL "
4018 "but numelements output parameter has value %" PRIu64
" "
4019 "(expected 0 or 1)",
4032 LWDEBUG(1,
"Updating next_{right,left}_face of ring edges...");
4040 node_ids[nedges++] = edge->
end_node;
4046 if (nedges == UINT64_MAX)
4051 nedge_left = nedge_right = 0;
4052 for ( i=0; i<nedges; ++i )
4055 if ( e->
edge_id == edge_id )
continue;
4093 LWDEBUGF(1,
"updating %d 'next_left' edges", nedge_left);
4106 LWDEBUGF(1,
"updating %d 'next_right' edges", nedge_right);
4117 LWDEBUGF(1,
"releasing %llu updateable edges in %p", nedges, upd_edge);
4135 LWDEBUG(1,
"floodface is universe");
4149 if (nfaces == UINT64_MAX)
4156 for ( i=0; i<nfaces; ++i )
4158 if ( faces[i].face_id == edge->
face_left )
4160 if ( ! box1 ) box1 = faces[i].
mbr;
4166 lwerror(
"corrupted topology: more than 1 face have face_id=%"
4171 else if ( faces[i].face_id == edge->
face_right )
4173 if ( ! box2 ) box2 = faces[i].
mbr;
4179 lwerror(
"corrupted topology: more than 1 face have face_id=%"
4189 lwerror(
"Backend coding error: getFaceById returned face "
4198 lwerror(
"corrupted topology: no face have face_id=%"
4207 lwerror(
"corrupted topology: no face have face_id=%"
4228 lwerror(
"Unexpected error: %" PRIu64
" faces updated when expecting 1", i);
4247 lwerror(
"Unexpected error: %d faces inserted when expecting 1",
result);
4312 if ( ! fnode_edges )
4354 return modFace ? floodface : newface.
face_id;
char result[OUT_DOUBLE_BUFFER_SIZE]
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 PGTOPO_BE_ERROR()
#define LWDEBUG(level, msg)
#define LWDEBUGF(level, msg,...)
void void lwerror(const char *fmt,...) __attribute__((format(printf
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)
LWT_ISO_EDGE * lwt_be_getEdgeByNode(LWT_TOPOLOGY *topo, const LWT_ELEMID *ids, uint64_t *numelems, int fields)
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)
void _lwt_release_faces(LWT_ISO_FACE *faces, int num_faces)
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)
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)
void _lwt_release_edges(LWT_ISO_EDGE *edges, int num_edges)
int lwt_be_updateEdgesById(LWT_TOPOLOGY *topo, const LWT_ISO_EDGE *edges, int numedges, int upd_fields)
static LWT_ISO_FACE * lwt_be_getFaceById(LWT_TOPOLOGY *topo, const LWT_ELEMID *ids, uint64_t *numelems, int fields)
int lwt_be_insertFaces(LWT_TOPOLOGY *topo, LWT_ISO_FACE *face, uint64_t numelems)
LWT_ELEMID containing_face
const LWT_BE_IFACE * be_iface