Blender V5.0
MOD_solidify_extrude.cc File Reference
#include <algorithm>
#include "BLI_math_vector.h"
#include "BLI_utildefines.h"
#include "BLI_bitmap.h"
#include "BLI_math_geom.h"
#include "BLI_utildefines_stack.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "MEM_guardedalloc.h"
#include "BKE_attribute.hh"
#include "BKE_customdata.hh"
#include "BKE_deform.hh"
#include "BKE_mesh.hh"
#include "MOD_solidify_util.hh"
#include "MOD_util.hh"

Go to the source code of this file.

Classes

struct  EdgeFaceRef

Macros

#define INVALID_UNUSED   uint(-1)
#define INVALID_PAIR   uint(-2)
#define INIT_VERT_ARRAY_OFFSETS(test)

Functions

Main Solidify Function
MeshMOD_solidify_extrude_modifyMesh (ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh)

High Quality Normal Calculation Function

High quality mesh normal calculation function (could be exposed for other functions to use).

#define USE_NONMANIFOLD_WORKAROUND
BLI_INLINE bool edgeref_is_init (const EdgeFaceRef *edge_ref)
static void mesh_calc_hq_normal (Mesh *mesh, const blender::Span< blender::float3 > face_normals, float(*r_vert_nors)[3], BLI_bitmap *edge_tmp_tag)

Macro Definition Documentation

◆ INIT_VERT_ARRAY_OFFSETS

#define INIT_VERT_ARRAY_OFFSETS ( test)
Value:
if (((ofs_new >= ofs_orig) == do_flip) == test) { \
i_end = verts_num; \
do_shell_align = true; \
vert_index = 0; \
} \
else { \
if (do_shell) { \
i_end = verts_num; \
do_shell_align = true; \
} \
else { \
i_end = newVerts; \
do_shell_align = false; \
} \
vert_index = verts_num; \
} \
(void)0

Referenced by MOD_solidify_extrude_modifyMesh().

◆ INVALID_PAIR

#define INVALID_PAIR   uint(-2)

◆ INVALID_UNUSED

#define INVALID_UNUSED   uint(-1)

◆ USE_NONMANIFOLD_WORKAROUND

#define USE_NONMANIFOLD_WORKAROUND

Definition at line 40 of file MOD_solidify_extrude.cc.

Referenced by mesh_calc_hq_normal(), and MOD_solidify_extrude_modifyMesh().

Function Documentation

◆ edgeref_is_init()

BLI_INLINE bool edgeref_is_init ( const EdgeFaceRef * edge_ref)

Definition at line 47 of file MOD_solidify_extrude.cc.

References BLI_INLINE, EdgeFaceRef::p1, and EdgeFaceRef::p2.

Referenced by mesh_calc_hq_normal().

◆ mesh_calc_hq_normal()

void mesh_calc_hq_normal ( Mesh * mesh,
const blender::Span< blender::float3 > face_normals,
float(*) r_vert_nors[3],
BLI_bitmap * edge_tmp_tag )
static

◆ MOD_solidify_extrude_modifyMesh()

Mesh * MOD_solidify_extrude_modifyMesh ( ModifierData * md,
const ModifierEvalContext * ctx,
Mesh * mesh )

Definition at line 147 of file MOD_solidify_extrude.cc.

References angle(), angle_normalized_v3v3(), angle_signed_on_axis_v3v3_v3(), Geometry::attributes, SolidifyModifierData::bevel_convex, BKE_defvert_ensure_index(), BKE_defvert_find_weight(), BKE_id_defgroup_name_index(), BKE_mesh_new_nomain_from_template(), BLI_assert, BLI_BITMAP_ENABLE, BLI_BITMAP_NEW, BLI_BITMAP_TEST, CD_ORIGINDEX, CLAMP, clamp_f(), blender::bke::AttributeAccessor::contains(), blender::MutableSpan< T >::copy_from(), copy_v3_v3(), copy_vn_fl(), copy_vn_i(), Mesh::corner_data, Mesh::corners_num, cosf, SolidifyModifierData::crease_inner, SolidifyModifierData::crease_outer, SolidifyModifierData::crease_rim, CustomData_copy_data(), CustomData_get_layer_for_write(), SolidifyModifierData::defgrp_name, blender::MutableSpan< T >::drop_front(), e, blender::bke::Edge, Mesh::edge_data, Mesh::edges_num, ELEM, fabsf, blender::bke::Face, Mesh::face_data, Mesh::faces_num, blender::bke::SpanAttributeWriter< T >::finish(), SolidifyModifierData::flag, float, FLT_MAX, i, Mesh::id, blender::offset_indices::OffsetIndices< T >::index_range(), INIT_VERT_ARRAY_OFFSETS, INVALID_PAIR, INVALID_UNUSED, blender::Span< T >::is_empty(), blender::IndexRange::last(), len_squared_v3v3(), LIKELY, blender::bke::AttributeAccessor::lookup(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), M_PI, madd_v3_v3fl(), SolidifyModifierData::mat_ofs, SolidifyModifierData::mat_ofs_rim, max_ff(), MEM_calloc_arrayN(), MEM_freeN(), MEM_malloc_arrayN(), MEM_SAFE_FREE, mesh_calc_hq_normal(), min_ff(), MOD_get_vgroup(), MOD_SOLIDIFY_EVEN, MOD_SOLIDIFY_FLIP, MOD_SOLIDIFY_NORMAL_CALC, MOD_SOLIDIFY_NOSHELL, MOD_SOLIDIFY_OFFSET_ANGLE_CLAMP, MOD_SOLIDIFY_RIM, MOD_SOLIDIFY_VGROUP_INV, normalize_v3(), ModifierEvalContext::object, SolidifyModifierData::offset, SolidifyModifierData::offset_clamp, SolidifyModifierData::offset_fac, SolidifyModifierData::offset_fac_vg, ORIGINDEX_NONE, blender::bke::Point, result, SolidifyModifierData::rim_defgrp_name, SolidifyModifierData::shell_defgrp_name, shell_v3v3_normalized_to_dist(), blender::IndexRange::size(), blender::offset_indices::OffsetIndices< T >::size(), blender::MutableSpan< T >::slice(), blender::bke::SpanAttributeWriter< T >::span, sqrtf, STACK_DECLARE, STACK_INIT, STACK_PUSH, STACK_SIZE, blender::IndexRange::start(), sub_v3_v3v3(), blender::MutableSpan< T >::take_front(), Object::totcol, USE_NONMANIFOLD_WORKAROUND, Mesh::vert_data, Mesh::verts_num, and MDeformWeight::weight.

Referenced by modify_mesh().