Blender V4.3
MOD_solidify_extrude.cc File Reference
#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_modifiertypes.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 39 of file MOD_solidify_extrude.cc.

Referenced by MOD_solidify_extrude_modifyMesh().

Function Documentation

◆ edgeref_is_init()

BLI_INLINE bool edgeref_is_init ( const EdgeFaceRef * edge_ref)

Definition at line 46 of file MOD_solidify_extrude.cc.

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

Referenced by mesh_calc_hq_normal().

◆ mesh_calc_hq_normal()

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 )
static
Parameters
meshMesh to calculate normals for.
face_normalsPrecalculated face normals.
r_vert_norsReturn vert normals.

Definition at line 56 of file MOD_solidify_extrude.cc.

References add_v3_v3(), add_v3_v3v3(), angle_normalized_v3v3(), BLI_BITMAP_ENABLE, copy_v3_v3(), edgeref_is_init(), MEM_freeN(), mid_v3_v3v3_angle_weighted(), normalize_v3(), normalize_v3_length(), EdgeFaceRef::p1, EdgeFaceRef::p2, and blender::Span< T >::slice().

Referenced by MOD_solidify_extrude_modifyMesh().

◆ MOD_solidify_extrude_modifyMesh()

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

Definition at line 146 of file MOD_solidify_extrude.cc.

References angle(), angle_normalized_v3v3(), angle_signed_on_axis_v3v3_v3(), 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, CD_PROP_FLOAT, CD_SET_DEFAULT, CLAMP, clamp_f(), blender::MutableSpan< T >::copy_from(), copy_v3_v3(), copy_vn_fl(), copy_vn_i(), cosf, SolidifyModifierData::crease_inner, SolidifyModifierData::crease_outer, SolidifyModifierData::crease_rim, CustomData_add_layer_named(), CustomData_copy_data(), CustomData_get_layer_for_write(), CustomData_get_layer_named(), CustomData_get_layer_named_for_write(), SolidifyModifierData::defgrp_name, blender::MutableSpan< T >::drop_front(), e, ELEM, fabsf, blender::bke::SpanAttributeWriter< T >::finish(), SolidifyModifierData::flag, float, FLT_MAX, blender::offset_indices::OffsetIndices< T >::index_range(), INIT_VERT_ARRAY_OFFSETS, int, INVALID_PAIR, INVALID_UNUSED, len_squared_v3v3(), LIKELY, 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, result, SolidifyModifierData::rim_defgrp_name, SolidifyModifierData::shell_defgrp_name, shell_v3v3_normalized_to_dist(), blender::offset_indices::OffsetIndices< T >::size(), blender::bke::SpanAttributeWriter< T >::span, sqrtf, STACK_DECLARE, STACK_INIT, STACK_PUSH, STACK_SIZE, sub_v3_v3v3(), blender::MutableSpan< T >::take_front(), Object::totcol, USE_NONMANIFOLD_WORKAROUND, and MDeformWeight::weight.

Referenced by modify_mesh().