Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/mesh/editmesh_knife.c
| Context not available. | |||||
| static bool find_hole_chains(KnifeTool_OpData *kcd, ListBase *hole, BMFace *f, ListBase **mainchain, | static bool find_hole_chains(KnifeTool_OpData *kcd, ListBase *hole, BMFace *f, ListBase **mainchain, | ||||
| ListBase **sidechain) | ListBase **sidechain) | ||||
| { | { | ||||
| float (*fco)[2], (*hco)[2]; | float **fco, **hco; | ||||
| BMVert **fv; | BMVert **fv; | ||||
| KnifeVert **hv; | KnifeVert **hv; | ||||
| KnifeEdge **he; | KnifeEdge **he; | ||||
| Context not available. | |||||
| /* Gather 2d projections of hole and face vertex coordinates. | /* Gather 2d projections of hole and face vertex coordinates. | ||||
| * Use best-axis projection - not completely accurate, maybe revisit */ | * Use best-axis projection - not completely accurate, maybe revisit */ | ||||
| axis_dominant_v3(&ax, &ay, f->no); | axis_dominant_v3(&ax, &ay, f->no); | ||||
| hco = BLI_memarena_alloc(kcd->arena, nh * sizeof(float[2])); | hco = BLI_memarena_alloc(kcd->arena, nh * sizeof(float *)); | ||||
| fco = BLI_memarena_alloc(kcd->arena, nf * sizeof(float[2])); | fco = BLI_memarena_alloc(kcd->arena, nf * sizeof(float *)); | ||||
| hv = BLI_memarena_alloc(kcd->arena, nh * sizeof(KnifeVert *)); | hv = BLI_memarena_alloc(kcd->arena, nh * sizeof(KnifeVert *)); | ||||
| fv = BLI_memarena_alloc(kcd->arena, nf * sizeof(BMVert *)); | fv = BLI_memarena_alloc(kcd->arena, nf * sizeof(BMVert *)); | ||||
| he = BLI_memarena_alloc(kcd->arena, nh * sizeof(KnifeEdge *)); | he = BLI_memarena_alloc(kcd->arena, nh * sizeof(KnifeEdge *)); | ||||
| Context not available. | |||||
| kfv = kfvother; | kfv = kfvother; | ||||
| BLI_assert(kfv == kfe->v1 || kfv == kfe->v2); | BLI_assert(kfv == kfe->v1 || kfv == kfe->v2); | ||||
| } | } | ||||
| hco[i] = BLI_memarena_alloc(kcd->arena, 2 * sizeof(float)); | |||||
| hco[i][0] = kfv->co[ax]; | hco[i][0] = kfv->co[ax]; | ||||
| hco[i][1] = kfv->co[ay]; | hco[i][1] = kfv->co[ay]; | ||||
| hv[i] = kfv; | hv[i] = kfv; | ||||
| Context not available. | |||||
| j = 0; | j = 0; | ||||
| BM_ITER_ELEM (v, &iter, f, BM_VERTS_OF_FACE) { | BM_ITER_ELEM (v, &iter, f, BM_VERTS_OF_FACE) { | ||||
| fco[j] = BLI_memarena_alloc(kcd->arena, 2 * sizeof(float)); | |||||
| fco[j][0] = v->co[ax]; | fco[j][0] = v->co[ax]; | ||||
| fco[j][1] = v->co[ay]; | fco[j][1] = v->co[ay]; | ||||
| fv[j] = v; | fv[j] = v; | ||||
| Context not available. | |||||