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
35
50
60
63
67
70
79
87
96
106
115
125
131
136
142
147
151
156
164
171
179
187
194
202
212
221
231
235
240
243MRC_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);
244
247
250
254
257
260
265
274
282
291
297
302
308
312
317
321
324
327
331
334
337
342
371
378
406
414
423
424// if not-negative number then it is edgeid;
425// otherwise it refers to the edge created recently
430
431// if not-negative number then it is edgeid;
432// otherwise it refers to the edge created recently
436
437// if not-negative number then it is edgeid;
438// otherwise it refers to the edge created recently
443
444// if not-negative number then it is edgeid;
445// otherwise it refers to the edge created recently
450
451// if not-negative number then it is edgeid;
452// otherwise it refers to the edge created recently
456
457// if not-negative number then it is edgeid;
458// otherwise it refers to the edge created recently
463
467
472
476
479
482
487
490
493
499
504
508
513
514// the number of triangles in the filling
519
520// the number of triangles in the filling
524
525// the number of triangles in the filling
530
534
539
543
546
549
553
556
559
564
573
583
590
598
605
631
640
649
657
664MRC_API MR_EdgeId MR_buildBottom(MR_Mesh *mesh, MR_EdgeId a, MR_Vector3f dir, float holeExtension, MR_FaceBitSet *outNewFaces);
665
672
678
683
689
696
702
709
716
722
729
733
738
742
745
748
753
756
759
764
770
779
788
799
805
811
812#ifdef __cplusplus
813} // extern "C"
814#endif
struct MR_MeshTopology MR_MeshTopology
Definition MR2DContoursTriangulation.h:15
struct MR_FaceBitSet MR_FaceBitSet
Definition MRAABBTreeBase.h:24
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:12
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
Generated from class MR::FillHoleItem.
Definition MRMeshFillHole.h:62
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:66
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
Generated from class MR::MakeBridgeResult.
Definition MRMeshFillHole.h:69
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
Generated from class MR::StitchHolesParams.
Definition MRMeshFillHole.h:59
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:45
@ MR_FillHoleParams_MultipleEdgesResolveMode_None
Definition MRMeshFillHole.h:46
@ MR_FillHoleParams_MultipleEdgesResolveMode_Strong
Definition MRMeshFillHole.h:48
@ MR_FillHoleParams_MultipleEdgesResolveMode_Simple
Definition MRMeshFillHole.h:47
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:19
#define MRC_API
Definition exports.h:11
Definition MRId.h:151
Definition MRVector3.h:50
Definition MRId.h:55