Blender V5.0
bmo_connect_concave.cc File Reference
#include "MEM_guardedalloc.h"
#include "BLI_alloca.h"
#include "BLI_heap.h"
#include "BLI_linklist.h"
#include "BLI_math_geom.h"
#include "BLI_math_vector.h"
#include "BLI_memarena.h"
#include "BLI_polyfill_2d.h"
#include "BLI_polyfill_2d_beautify.h"
#include "bmesh.hh"
#include "intern/bmesh_operators_private.hh"

Go to the source code of this file.

Macros

#define EDGE_OUT   (1 << 0)
#define FACE_OUT   (1 << 1)

Functions

static int bm_edge_length_cmp (const void *a_, const void *b_)
static bool bm_face_split_by_concave (BMesh *bm, BMFace *f_base, const float eps, MemArena *pf_arena, Heap *pf_heap)
static bool bm_face_convex_tag_verts (BMFace *f)
void bmo_connect_verts_concave_exec (BMesh *bm, BMOperator *op)

Detailed Description

Connect vertices so all resulting faces are convex.

Implementation:

  • triangulate all concave face (tagging convex verts),
  • rotate edges (beautify) so edges will connect nearby verts.
  • sort long edges (longest first), put any edges between 2 convex verts last since they often split convex regions.
  • merge the sorted edges as long as they don't create convex ngons.

Definition in file bmo_connect_concave.cc.

Macro Definition Documentation

◆ EDGE_OUT

#define EDGE_OUT   (1 << 0)

Definition at line 34 of file bmo_connect_concave.cc.

◆ FACE_OUT

#define FACE_OUT   (1 << 1)

Definition at line 35 of file bmo_connect_concave.cc.

Function Documentation

◆ bm_edge_length_cmp()

int bm_edge_length_cmp ( const void * a_,
const void * b_ )
static

◆ bm_face_convex_tag_verts()

bool bm_face_convex_tag_verts ( BMFace * f)
static

◆ bm_face_split_by_concave()

◆ bmo_connect_verts_concave_exec()