MeshLib C Docs
Loading...
Searching...
No Matches
MRMeshFillHole.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MRId.h>
4#include <MRCMesh/MRVector3.h>
5#include <MRCMisc/common.h>
6#include <MRCMisc/exports.h>
7
8#include <stdbool.h>
9#include <stddef.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15typedef struct MR_FaceBitSet MR_FaceBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
16typedef struct MR_FillHoleMetric MR_FillHoleMetric; // Defined in `#include <MRCMesh/MRMeshMetrics.h>`.
17typedef struct MR_Mesh MR_Mesh; // Defined in `#include <MRCMesh/MRMesh.h>`.
18typedef struct MR_MeshTopology MR_MeshTopology; // Defined in `#include <MRCMesh/MRMeshTopology.h>`.
19typedef struct MR_Plane3f MR_Plane3f; // Defined in `#include <MRCMesh/MRPlane3.h>`.
20typedef struct MR_std_function_MR_Vector3f_from_const_MR_Vector3f_ref MR_std_function_MR_Vector3f_from_const_MR_Vector3f_ref; // Defined in `#include <MRCMisc/std_function_MR_Vector3f_from_const_MR_Vector3f_ref.h>`.
21typedef struct MR_std_vector_MR_EdgeId MR_std_vector_MR_EdgeId; // Defined in `#include <MRCMisc/std_vector_MR_EdgeId.h>`.
22typedef struct MR_std_vector_MR_FillHoleItem MR_std_vector_MR_FillHoleItem; // Defined in `#include <MRCMisc/std_vector_MR_FillHoleItem.h>`.
23typedef struct MR_std_vector_MR_HoleFillPlan MR_std_vector_MR_HoleFillPlan; // Defined in `#include <MRCMisc/std_vector_MR_HoleFillPlan.h>`.
24
25
40
51
62
66
71
75
84
92
101
111
120
130
136
141
147
152
156
161
169
176
184
192
199
207
217
226
236
240
245
248MRC_API MR_FillHoleParams *MR_FillHoleParams_ConstructFrom(MR_PassBy metric_pass_by, MR_FillHoleMetric *metric, bool smoothBd, MR_FaceBitSet *outNewFaces, MR_FillHoleParams_MultipleEdgesResolveMode multipleEdgesResolveMode, bool makeDegenerateBand, int maxPolygonSubdivisions, bool *stopBeforeBadTriangulation);
249
252
255
259
262
265
270
279
287
296
302
307
313
317
322
326
329
332
336
339
342
347
376
383
411
419
428
429// if not-negative number then it is edgeid;
430// otherwise it refers to the edge created recently
435
436// if not-negative number then it is edgeid;
437// otherwise it refers to the edge created recently
441
442// if not-negative number then it is edgeid;
443// otherwise it refers to the edge created recently
448
449// if not-negative number then it is edgeid;
450// otherwise it refers to the edge created recently
455
456// if not-negative number then it is edgeid;
457// otherwise it refers to the edge created recently
461
462// if not-negative number then it is edgeid;
463// otherwise it refers to the edge created recently
468
472
477
481
484
487
492
495
498
504
509
513
518
519// the number of triangles in the filling
524
525// the number of triangles in the filling
529
530// the number of triangles in the filling
535
539
544
548
551
554
558
561
564
569
578
588
595
603
610
636
645
654
662
669MRC_API MR_EdgeId MR_buildBottom(MR_Mesh *mesh, MR_EdgeId a, MR_Vector3f dir, float holeExtension, MR_FaceBitSet *outNewFaces);
670
677
683
688
694
701
707
714
721
727
734
738
743
747
750
753
758
761
764
769
775
784
793
804
810
816
817#ifdef __cplusplus
818} // extern "C"
819#endif
struct MR_MeshTopology MR_MeshTopology
Definition MR2DContoursTriangulation.h:15
struct MR_FaceBitSet MR_FaceBitSet
Definition MRAABBTree.h:17
struct MR_Plane3f MR_Plane3f
Definition MRBestFit.h:22
struct MR_std_vector_MR_EdgeId MR_std_vector_MR_EdgeId
Definition MRContoursStitch.h:11
struct MR_Mesh MR_Mesh
Definition MRCtm.h:16
struct MR_FillHoleParams MR_FillHoleParams
Definition MRFillHoleNicely.h:17
MRC_API MR_HoleFillPlan * MR_HoleFillPlan_ConstructFromAnother(MR_PassBy _other_pass_by, MR_HoleFillPlan *_other)
MRC_API const int * MR_HoleFillPlan_Get_numTris(const MR_HoleFillPlan *_this)
struct MR_FillHoleItem MR_FillHoleItem
Definition MRMeshFillHole.h:65
MRC_API bool *const * MR_FillHoleParams_Get_stopBeforeBadTriangulation(const MR_FillHoleParams *_this)
MRC_API MR_FillHoleParams * MR_FillHoleParams_DefaultConstructArray(size_t num_elems)
MRC_API MR_std_vector_MR_FillHoleItem * MR_HoleFillPlan_GetMutable_items(MR_HoleFillPlan *_this)
MRC_API MR_FillHoleParams * MR_FillHoleParams_ConstructFromAnother(MR_PassBy _other_pass_by, MR_FillHoleParams *_other)
MRC_API void MR_FillHoleItem_Destroy(const MR_FillHoleItem *_this)
Destroys a heap-allocated instance of MR_FillHoleItem. Does nothing if the pointer is null.
MRC_API MR_FillHoleMetric * MR_StitchHolesParams_GetMutable_metric(MR_StitchHolesParams *_this)
MRC_API MR_MakeBridgeResult * MR_makeBridge(MR_MeshTopology *topology, MR_EdgeId a, MR_EdgeId b, MR_FaceBitSet *outNewFaces)
MRC_API MR_StitchHolesParams * MR_StitchHolesParams_OffsetMutablePtr(MR_StitchHolesParams *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API MR_std_vector_MR_HoleFillPlan * MR_getHoleFillPlans(const MR_Mesh *mesh, const MR_std_vector_MR_EdgeId *holeRepresentativeEdges, const MR_FillHoleParams *params)
MRC_API bool MR_buildCylinderBetweenTwoHoles_2(MR_Mesh *mesh, const MR_StitchHolesParams *params)
MRC_API void MR_FillHoleParams_Set_metric(MR_FillHoleParams *_this, MR_PassBy value_pass_by, MR_FillHoleMetric *value)
MRC_API MR_MakeBridgeResult * MR_MakeBridgeResult_AssignFromAnother(MR_MakeBridgeResult *_this, const MR_MakeBridgeResult *_other)
MRC_API MR_HoleFillPlan * MR_getHoleFillPlan(const MR_Mesh *mesh, MR_EdgeId e, const MR_FillHoleParams *params)
MRC_API MR_HoleFillPlan * MR_HoleFillPlan_DefaultConstructArray(size_t num_elems)
MRC_API const MR_std_vector_MR_FillHoleItem * MR_HoleFillPlan_Get_items(const MR_HoleFillPlan *_this)
MRC_API MR_StitchHolesParams * MR_StitchHolesParams_ConstructFrom(MR_PassBy metric_pass_by, MR_FillHoleMetric *metric, MR_FaceBitSet *outNewFaces)
MRC_API MR_StitchHolesParams * MR_StitchHolesParams_DefaultConstructArray(size_t num_elems)
MRC_API void MR_splitQuad(MR_MeshTopology *topology, MR_EdgeId a, MR_FaceBitSet *outNewFaces)
MRC_API MR_FillHoleParams_MultipleEdgesResolveMode * MR_FillHoleParams_GetMutable_multipleEdgesResolveMode(MR_FillHoleParams *_this)
MRC_API MR_EdgeId * MR_MakeBridgeResult_GetMutable_na(MR_MakeBridgeResult *_this)
MRC_API void MR_HoleFillPlan_Set_items(MR_HoleFillPlan *_this, MR_PassBy value_pass_by, MR_std_vector_MR_FillHoleItem *value)
MRC_API MR_StitchHolesParams * MR_StitchHolesParams_AssignFromAnother(MR_StitchHolesParams *_this, MR_PassBy _other_pass_by, MR_StitchHolesParams *_other)
MRC_API MR_FaceBitSet *const * MR_FillHoleParams_Get_outNewFaces(const MR_FillHoleParams *_this)
MRC_API MR_FillHoleItem * MR_FillHoleItem_DefaultConstruct(void)
MRC_API MR_MakeBridgeResult * MR_makeSmoothBridge(MR_Mesh *mesh, MR_EdgeId a, MR_EdgeId b, float samplingStep, MR_FaceBitSet *outNewFaces)
MRC_API MR_std_vector_MR_HoleFillPlan * MR_getPlanarHoleFillPlans(const MR_Mesh *mesh, const MR_std_vector_MR_EdgeId *holeRepresentativeEdges)
struct MR_std_function_MR_Vector3f_from_const_MR_Vector3f_ref MR_std_function_MR_Vector3f_from_const_MR_Vector3f_ref
Definition MRMeshFillHole.h:20
struct MR_HoleFillPlan MR_HoleFillPlan
Definition MRMeshFillHole.h:70
MRC_API bool * MR_FillHoleParams_GetMutable_makeDegenerateBand(MR_FillHoleParams *_this)
MRC_API const int * MR_FillHoleParams_Get_maxPolygonSubdivisions(const MR_FillHoleParams *_this)
MRC_API MR_MakeBridgeResult * MR_MakeBridgeResult_DefaultConstructArray(size_t num_elems)
MRC_API MR_HoleFillPlan * MR_getPlanarHoleFillPlan(const MR_Mesh *mesh, MR_EdgeId e)
MRC_API MR_StitchHolesParams * MR_StitchHolesParams_DefaultConstruct(void)
MRC_API void MR_FillHoleItem_Set_edgeCode2(MR_FillHoleItem *_this, int value)
MRC_API MR_FillHoleItem * MR_FillHoleItem_ConstructFrom(int edgeCode1, int edgeCode2)
MRC_API MR_FaceBitSet ** MR_FillHoleParams_GetMutable_outNewFaces(MR_FillHoleParams *_this)
MRC_API const MR_FillHoleItem * MR_FillHoleItem_OffsetPtr(const MR_FillHoleItem *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API MR_FillHoleParams * MR_FillHoleParams_OffsetMutablePtr(MR_FillHoleParams *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API void MR_FillHoleItem_Set_edgeCode1(MR_FillHoleItem *_this, int value)
MRC_API const MR_MakeBridgeResult * MR_MakeBridgeResult_OffsetPtr(const MR_MakeBridgeResult *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
struct MR_FillHoleMetric MR_FillHoleMetric
Definition MRMeshFillHole.h:16
MRC_API void MR_FillHoleParams_Set_smoothBd(MR_FillHoleParams *_this, bool value)
MRC_API bool * MR_FillHoleParams_GetMutable_smoothBd(MR_FillHoleParams *_this)
struct MR_MakeBridgeResult MR_MakeBridgeResult
Definition MRMeshFillHole.h:74
struct MR_std_vector_MR_HoleFillPlan MR_std_vector_MR_HoleFillPlan
Definition MRMeshFillHole.h:23
MRC_API MR_std_vector_MR_EdgeId * MR_extendAllHoles(MR_Mesh *mesh, const MR_Plane3f *plane, MR_FaceBitSet *outNewFaces)
MRC_API void MR_FillHoleItem_DestroyArray(const MR_FillHoleItem *_this)
Destroys a heap-allocated array of MR_FillHoleItem. Does nothing if the pointer is null.
struct MR_std_vector_MR_FillHoleItem MR_std_vector_MR_FillHoleItem
Definition MRMeshFillHole.h:22
MRC_API MR_MakeBridgeResult * MR_MakeBridgeResult_ConstructFrom(int newFaces, MR_EdgeId na, MR_EdgeId nb)
MRC_API void MR_fillHoles(MR_Mesh *mesh, const MR_std_vector_MR_EdgeId *as, const MR_FillHoleParams *params)
MRC_API const MR_FillHoleMetric * MR_FillHoleParams_Get_metric(const MR_FillHoleParams *_this)
MRC_API void MR_buildCylinderBetweenTwoHoles_4(MR_Mesh *mesh, MR_EdgeId a, MR_EdgeId b, const MR_StitchHolesParams *params)
Stitches two holes in Mesh .
MRC_API MR_FaceBitSet *const * MR_StitchHolesParams_Get_outNewFaces(const MR_StitchHolesParams *_this)
MRC_API MR_FillHoleMetric * MR_FillHoleParams_GetMutable_metric(MR_FillHoleParams *_this)
MRC_API void MR_executeHoleFillPlan(MR_Mesh *mesh, MR_EdgeId a0, MR_HoleFillPlan *plan, MR_FaceBitSet *outNewFaces)
MRC_API const int * MR_FillHoleItem_Get_edgeCode1(const MR_FillHoleItem *_this)
MRC_API void MR_FillHoleParams_DestroyArray(const MR_FillHoleParams *_this)
Destroys a heap-allocated array of MR_FillHoleParams. Does nothing if the pointer is null.
MRC_API MR_FillHoleItem * MR_FillHoleItem_DefaultConstructArray(size_t num_elems)
MRC_API const MR_HoleFillPlan * MR_HoleFillPlan_OffsetPtr(const MR_HoleFillPlan *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API MR_FillHoleItem * MR_FillHoleItem_AssignFromAnother(MR_FillHoleItem *_this, const MR_FillHoleItem *_other)
MRC_API void MR_FillHoleParams_Set_multipleEdgesResolveMode(MR_FillHoleParams *_this, MR_FillHoleParams_MultipleEdgesResolveMode value)
MRC_API MR_FaceBitSet ** MR_StitchHolesParams_GetMutable_outNewFaces(MR_StitchHolesParams *_this)
MRC_API int * MR_FillHoleItem_GetMutable_edgeCode1(MR_FillHoleItem *_this)
MRC_API void MR_StitchHolesParams_Set_outNewFaces(MR_StitchHolesParams *_this, MR_FaceBitSet *value)
MRC_API MR_FillHoleParams * MR_FillHoleParams_DefaultConstruct(void)
MRC_API MR_MakeBridgeResult * MR_makeQuadBridge(MR_MeshTopology *topology, MR_EdgeId a, MR_EdgeId b, MR_FaceBitSet *outNewFaces)
MRC_API const MR_EdgeId * MR_MakeBridgeResult_Get_nb(const MR_MakeBridgeResult *_this)
MRC_API MR_MakeBridgeResult * MR_MakeBridgeResult_OffsetMutablePtr(MR_MakeBridgeResult *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API MR_HoleFillPlan * MR_HoleFillPlan_ConstructFrom(MR_PassBy items_pass_by, MR_std_vector_MR_FillHoleItem *items, int numTris)
struct MR_StitchHolesParams MR_StitchHolesParams
Definition MRMeshFillHole.h:61
MRC_API void MR_MakeBridgeResult_Set_newFaces(MR_MakeBridgeResult *_this, int value)
MRC_API MR_FillHoleItem * MR_FillHoleItem_OffsetMutablePtr(MR_FillHoleItem *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API MR_EdgeId MR_makeDegenerateBandAroundHole(MR_Mesh *mesh, MR_EdgeId a, MR_FaceBitSet *outNewFaces)
MRC_API void MR_StitchHolesParams_Destroy(const MR_StitchHolesParams *_this)
Destroys a heap-allocated instance of MR_StitchHolesParams. Does nothing if the pointer is null.
MRC_API void MR_MakeBridgeResult_Set_nb(MR_MakeBridgeResult *_this, MR_EdgeId value)
MRC_API void MR_fillHole(MR_Mesh *mesh, MR_EdgeId a, const MR_FillHoleParams *params)
Fills hole in mesh .
MRC_API MR_FillHoleItem * MR_FillHoleItem_ConstructFromAnother(const MR_FillHoleItem *_other)
MRC_API MR_EdgeId MR_buildBottom(MR_Mesh *mesh, MR_EdgeId a, MR_Vector3f dir, float holeExtension, MR_FaceBitSet *outNewFaces)
MRC_API MR_EdgeId MR_makeBridgeEdge(MR_MeshTopology *topology, MR_EdgeId a, MR_EdgeId b)
MRC_API const MR_FillHoleMetric * MR_StitchHolesParams_Get_metric(const MR_StitchHolesParams *_this)
MRC_API MR_VertId MR_fillHoleTrivially(MR_Mesh *mesh, MR_EdgeId a, MR_FaceBitSet *outNewFaces)
Triangulates face of hole in mesh trivially .
MRC_API MR_HoleFillPlan * MR_HoleFillPlan_OffsetMutablePtr(MR_HoleFillPlan *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API MR_EdgeId MR_extendHole_std_function_MR_Vector3f_func_from_const_MR_Vector3f_ref(MR_Mesh *mesh, MR_EdgeId a, MR_PassBy getVertPos_pass_by, MR_std_function_MR_Vector3f_from_const_MR_Vector3f_ref *getVertPos, MR_FaceBitSet *outNewFaces)
MRC_API const MR_EdgeId * MR_MakeBridgeResult_Get_na(const MR_MakeBridgeResult *_this)
MRC_API void MR_FillHoleParams_Set_maxPolygonSubdivisions(MR_FillHoleParams *_this, int value)
MRC_API MR_EdgeId MR_extendHole_MR_Plane3f(MR_Mesh *mesh, MR_EdgeId a, const MR_Plane3f *plane, MR_FaceBitSet *outNewFaces)
MRC_API bool ** MR_FillHoleParams_GetMutable_stopBeforeBadTriangulation(MR_FillHoleParams *_this)
MRC_API MR_FillHoleParams * MR_FillHoleParams_AssignFromAnother(MR_FillHoleParams *_this, MR_PassBy _other_pass_by, MR_FillHoleParams *_other)
MRC_API MR_HoleFillPlan * MR_HoleFillPlan_AssignFromAnother(MR_HoleFillPlan *_this, MR_PassBy _other_pass_by, MR_HoleFillPlan *_other)
MRC_API void MR_FillHoleParams_Set_outNewFaces(MR_FillHoleParams *_this, MR_FaceBitSet *value)
MRC_API const int * MR_MakeBridgeResult_Get_newFaces(const MR_MakeBridgeResult *_this)
MRC_API bool MR_MakeBridgeResult_ConvertTo_bool(const MR_MakeBridgeResult *_this)
MRC_API MR_FillHoleParams * MR_FillHoleParams_ConstructFrom(MR_PassBy metric_pass_by, MR_FillHoleMetric *metric, bool smoothBd, MR_FaceBitSet *outNewFaces, MR_FillHoleParams_MultipleEdgesResolveMode multipleEdgesResolveMode, bool makeDegenerateBand, int maxPolygonSubdivisions, bool *stopBeforeBadTriangulation)
MRC_API MR_StitchHolesParams * MR_StitchHolesParams_ConstructFromAnother(MR_PassBy _other_pass_by, MR_StitchHolesParams *_other)
MRC_API int * MR_FillHoleParams_GetMutable_maxPolygonSubdivisions(MR_FillHoleParams *_this)
MRC_API void MR_MakeBridgeResult_Destroy(const MR_MakeBridgeResult *_this)
Destroys a heap-allocated instance of MR_MakeBridgeResult. Does nothing if the pointer is null.
MRC_API MR_EdgeId * MR_MakeBridgeResult_GetMutable_nb(MR_MakeBridgeResult *_this)
MRC_API const MR_StitchHolesParams * MR_StitchHolesParams_OffsetPtr(const MR_StitchHolesParams *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MR_FillHoleParams_MultipleEdgesResolveMode
Definition MRMeshFillHole.h:35
@ MR_FillHoleParams_MultipleEdgesResolveMode_None
Definition MRMeshFillHole.h:36
@ MR_FillHoleParams_MultipleEdgesResolveMode_Strong
Definition MRMeshFillHole.h:38
@ MR_FillHoleParams_MultipleEdgesResolveMode_Simple
Definition MRMeshFillHole.h:37
MRC_API void MR_HoleFillPlan_Set_numTris(MR_HoleFillPlan *_this, int value)
MRC_API const MR_FillHoleParams_MultipleEdgesResolveMode * MR_FillHoleParams_Get_multipleEdgesResolveMode(const MR_FillHoleParams *_this)
MRC_API void MR_HoleFillPlan_Destroy(const MR_HoleFillPlan *_this)
Destroys a heap-allocated instance of MR_HoleFillPlan. Does nothing if the pointer is null.
MRC_API void MR_FillHoleParams_Set_stopBeforeBadTriangulation(MR_FillHoleParams *_this, bool *value)
MRC_API const bool * MR_FillHoleParams_Get_smoothBd(const MR_FillHoleParams *_this)
MRC_API const MR_FillHoleParams * MR_FillHoleParams_OffsetPtr(const MR_FillHoleParams *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API int * MR_MakeBridgeResult_GetMutable_newFaces(MR_MakeBridgeResult *_this)
MRC_API int * MR_HoleFillPlan_GetMutable_numTris(MR_HoleFillPlan *_this)
MRC_API void MR_StitchHolesParams_Set_metric(MR_StitchHolesParams *_this, MR_PassBy value_pass_by, MR_FillHoleMetric *value)
MRC_API void MR_HoleFillPlan_DestroyArray(const MR_HoleFillPlan *_this)
Destroys a heap-allocated array of MR_HoleFillPlan. Does nothing if the pointer is null.
MRC_API const bool * MR_FillHoleParams_Get_makeDegenerateBand(const MR_FillHoleParams *_this)
MRC_API void MR_StitchHolesParams_DestroyArray(const MR_StitchHolesParams *_this)
Destroys a heap-allocated array of MR_StitchHolesParams. Does nothing if the pointer is null.
MRC_API MR_HoleFillPlan * MR_HoleFillPlan_DefaultConstruct(void)
MRC_API MR_MakeBridgeResult * MR_MakeBridgeResult_ConstructFromAnother(const MR_MakeBridgeResult *_other)
MRC_API void MR_FillHoleParams_Destroy(const MR_FillHoleParams *_this)
Destroys a heap-allocated instance of MR_FillHoleParams. Does nothing if the pointer is null.
MRC_API int * MR_FillHoleItem_GetMutable_edgeCode2(MR_FillHoleItem *_this)
MRC_API void MR_MakeBridgeResult_Set_na(MR_MakeBridgeResult *_this, MR_EdgeId value)
MRC_API void MR_FillHoleParams_Set_makeDegenerateBand(MR_FillHoleParams *_this, bool value)
MRC_API const int * MR_FillHoleItem_Get_edgeCode2(const MR_FillHoleItem *_this)
MRC_API MR_MakeBridgeResult * MR_MakeBridgeResult_DefaultConstruct(void)
MRC_API void MR_MakeBridgeResult_DestroyArray(const MR_MakeBridgeResult *_this)
Destroys a heap-allocated array of MR_MakeBridgeResult. Does nothing if the pointer is null.
MRC_API bool MR_isHoleBd(const MR_MeshTopology *topology, const MR_std_vector_MR_EdgeId *loop)
MR_PassBy
Definition common.h:23
#define MRC_API
Definition exports.h:11
Definition MRId.h:153
Definition MRVector3.h:52
Definition MRId.h:55