Blender  V3.3
Macros | Functions
bmo_rotate_edges.c File Reference
#include "MEM_guardedalloc.h"
#include "BLI_heap.h"
#include "BLI_math.h"
#include "bmesh.h"
#include "intern/bmesh_operators_private.h"

Go to the source code of this file.

Macros

#define EDGE_OUT   1
 
#define FACE_MARK   1
 

Functions

static void bm_rotate_edges_simple (BMesh *bm, BMOperator *op, const short check_flag, const bool use_ccw)
 
static float bm_edge_calc_rotate_cost (const BMEdge *e)
 
static float bm_edge_rotate_is_boundary (const BMEdge *e)
 
static void bm_rotate_edges_shared (BMesh *bm, BMOperator *op, short check_flag, const bool use_ccw, const int edges_len)
 
void bmo_rotate_edges_exec (BMesh *bm, BMOperator *op)
 

Detailed Description

Rotate edges topology that share two faces.

Definition in file bmo_rotate_edges.c.

Macro Definition Documentation

◆ EDGE_OUT

#define EDGE_OUT   1

Definition at line 18 of file bmo_rotate_edges.c.

◆ FACE_MARK

#define FACE_MARK   1

Definition at line 19 of file bmo_rotate_edges.c.

Function Documentation

◆ bm_edge_calc_rotate_cost()

static float bm_edge_calc_rotate_cost ( const BMEdge e)
static

Edge length is just a way of ordering that's independent of order in the edges argument, we could use some other method since ideally all edges will be rotated, this just happens to be simple to calculate.

Definition at line 50 of file bmo_rotate_edges.c.

References BM_edge_calc_length_squared(), and e.

Referenced by bm_rotate_edges_shared().

◆ bm_edge_rotate_is_boundary()

static float bm_edge_rotate_is_boundary ( const BMEdge e)
static

Check if this edge is a boundary: Are more than one of the connected faces edges rotating too?

Definition at line 58 of file bmo_rotate_edges.c.

References BM_elem_index_get, count, BMLoop::e, e, BMLoop::next, and BMLoop::radial_next.

Referenced by bm_rotate_edges_shared().

◆ bm_rotate_edges_shared()

static void bm_rotate_edges_shared ( BMesh bm,
BMOperator op,
short  check_flag,
const bool  use_ccw,
const int  edges_len 
)
static

◆ bm_rotate_edges_simple()

static void bm_rotate_edges_simple ( BMesh bm,
BMOperator op,
const short  check_flag,
const bool  use_ccw 
)
static

Rotate edges where every edge has its own faces (we can rotate in any order).

this ends up being called twice, could add option to not to call check in BM_edge_rotate to get some extra speed

Definition at line 24 of file bmo_rotate_edges.c.

References bm, BM_EDGE, BM_edge_rotate(), BM_edge_rotate_check(), BMO_edge_flag_enable, BMO_ITER, e, EDGE_OUT, NULL, and BMOperator::slots_in.

Referenced by bmo_rotate_edges_exec().

◆ bmo_rotate_edges_exec()

void bmo_rotate_edges_exec ( BMesh bm,
BMOperator op 
)