MeshLib C Docs
Loading...
Searching...
No Matches
MRContoursCut.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MRVector3.h>
4#include <MRCMisc/common.h>
5#include <MRCMisc/exports.h>
6
7#include <stddef.h>
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13typedef struct MR_AffineXf3f MR_AffineXf3f; // Defined in `#include <MRCMesh/MRAffineXf.h>`.
14typedef struct MR_FaceBitSet MR_FaceBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
15typedef struct MR_FaceMap MR_FaceMap; // Defined in `#include <MRCMesh/MRVector.h>`.
16typedef struct MR_Mesh MR_Mesh; // Defined in `#include <MRCMesh/MRMesh.h>`.
17typedef struct MR_SearchPathSettings MR_SearchPathSettings; // Defined in `#include <MRCMesh/MROneMeshContours.h>`.
18typedef struct MR_SortIntersectionsData MR_SortIntersectionsData; // Defined in `#include <MRCMesh/MROneMeshContours.h>`.
19typedef struct MR_UndirectedEdgeBitSet MR_UndirectedEdgeBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
20typedef struct MR_expected_MR_FaceBitSet_std_string MR_expected_MR_FaceBitSet_std_string; // Defined in `#include <MRCMisc/expected_MR_FaceBitSet_std_string.h>`.
21typedef struct MR_expected_std_vector_MR_OneMeshContour_std_string MR_expected_std_vector_MR_OneMeshContour_std_string; // Defined in `#include <MRCMisc/expected_std_vector_MR_OneMeshContour_std_string.h>`.
22typedef struct MR_expected_std_vector_std_vector_MR_EdgeId_std_string MR_expected_std_vector_std_vector_MR_EdgeId_std_string; // Defined in `#include <MRCMisc/expected_std_vector_std_vector_MR_EdgeId_std_string.h>`.
23typedef struct MR_phmap_flat_hash_map_MR_UndirectedEdgeId_int MR_phmap_flat_hash_map_MR_UndirectedEdgeId_int; // Defined in `#include <MRCMisc/phmap_flat_hash_map_MR_UndirectedEdgeId_int.h>`.
24typedef struct MR_std_function_float_from_int MR_std_function_float_from_int; // Defined in `#include <MRCMisc/std_function_float_from_int.h>`.
25typedef struct MR_std_vector_MR_MeshTriPoint MR_std_vector_MR_MeshTriPoint; // Defined in `#include <MRCMisc/std_vector_MR_MeshTriPoint.h>`.
26typedef struct MR_std_vector_MR_OneMeshContour MR_std_vector_MR_OneMeshContour; // Defined in `#include <MRCMisc/std_vector_MR_OneMeshContour.h>`.
27typedef struct MR_std_vector_MR_Vector3f MR_std_vector_MR_Vector3f; // Defined in `#include <MRCMisc/std_vector_MR_Vector3f.h>`.
28typedef struct MR_std_vector_std_vector_MR_EdgeId MR_std_vector_std_vector_MR_EdgeId; // Defined in `#include <MRCMisc/std_vector_std_vector_MR_EdgeId.h>`.
29typedef struct MR_std_vector_std_vector_MR_Vector3f MR_std_vector_std_vector_MR_Vector3f; // Defined in `#include <MRCMisc/std_vector_std_vector_MR_Vector3f.h>`.
30
31
35
45
51{
52 //< if bad faces occur does not fill anything
54 //< fills all faces except bad ones
56 //< fills all faces with bad ones, but on bad faces triangulation can also be bad (may have self-intersections or tunnels)
59
66
70
77
83
90
98
105
113
117
122
126
129
132
136
139
142
147
155
162
170
176
181
187
192
196
201
207
212
218
222
227
231
234
237
242
245
248
254
260
265
271
278
284
291
295
300
303MRC_API MR_CutMeshResult *MR_CutMeshResult_ConstructFrom(MR_PassBy resultCut_pass_by, MR_std_vector_std_vector_MR_EdgeId *resultCut, MR_PassBy fbsWithContourIntersections_pass_by, MR_FaceBitSet *fbsWithContourIntersections);
304
307
310
314
317
320
325
349
362
375
381
386
392
398
403
409
413
418
422
425
428
433
436
439
445
461
476
492
493#ifdef __cplusplus
494} // extern "C"
495#endif
struct MR_std_vector_std_vector_MR_EdgeId MR_std_vector_std_vector_MR_EdgeId
Definition MR2DContoursTriangulation.h:18
struct MR_FaceBitSet MR_FaceBitSet
Definition MRAABBTreeBase.h:24
struct MR_UndirectedEdgeBitSet MR_UndirectedEdgeBitSet
Definition MRAABBTreeBase.h:28
struct MR_std_vector_MR_MeshTriPoint MR_std_vector_MR_MeshTriPoint
Definition MRAggregateFlow.h:23
struct MR_std_vector_MR_Vector3f MR_std_vector_MR_Vector3f
Definition MRBestFit.h:25
struct MR_FaceMap MR_FaceMap
Definition MRBitSet.h:26
struct MR_std_vector_std_vector_MR_Vector3f MR_std_vector_std_vector_MR_Vector3f
Definition MRContour.h:17
MRC_API MR_expected_std_vector_std_vector_MR_EdgeId_std_string * MR_cutMeshByProjection(MR_Mesh *mesh, const MR_std_vector_std_vector_MR_Vector3f *contours, const MR_CutByProjectionSettings *settings)
Performs orthographic projection with of given contours to mesh and cut result lines,...
struct MR_std_vector_MR_OneMeshContour MR_std_vector_MR_OneMeshContour
Definition MRContoursCut.h:26
MRC_API const MR_CutByProjectionSettings * MR_CutByProjectionSettings_OffsetPtr(const MR_CutByProjectionSettings *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_CutMeshResult_Destroy(const MR_CutMeshResult *_this)
Destroys a heap-allocated instance of MR_CutMeshResult. Does nothing if the pointer is null.
MRC_API MR_FaceBitSet * MR_CutMeshResult_GetMutable_fbsWithContourIntersections(MR_CutMeshResult *_this)
MRC_API void MR_CutByProjectionSettings_Destroy(const MR_CutByProjectionSettings *_this)
Destroys a heap-allocated instance of MR_CutByProjectionSettings. Does nothing if the pointer is null...
MRC_API MR_UndirectedEdgeBitSet * MR_NewEdgesMap_GetMutable_splitEdges(MR_NewEdgesMap *_this)
MRC_API MR_expected_std_vector_MR_OneMeshContour_std_string * MR_convertMeshTriPointsSurfaceOffsetToMeshContours_float(const MR_Mesh *mesh, const MR_std_vector_MR_MeshTriPoint *surfaceLine, float offset, const MR_SearchPathSettings *searchSettings)
Makes continuous contour by iso-line from mesh tri points, if first and last meshTriPoint is the same...
MRC_API MR_CutMeshResult * MR_cutMesh(MR_Mesh *mesh, const MR_std_vector_MR_OneMeshContour *contours, const MR_CutMeshParameters *params)
Cuts mesh by given contours.
MRC_API MR_CutByProjectionSettings * MR_CutByProjectionSettings_ConstructFrom(MR_Vector3f direction, const MR_AffineXf3f *cont2mesh)
MRC_API MR_CutByProjectionSettings * MR_CutByProjectionSettings_ConstructFromAnother(const MR_CutByProjectionSettings *_other)
MRC_API MR_CutMeshResult * MR_CutMeshResult_ConstructFromAnother(MR_PassBy _other_pass_by, MR_CutMeshResult *_other)
struct MR_CutMeshResult MR_CutMeshResult
Generated from class MR::CutMeshResult.
Definition MRContoursCut.h:65
MRC_API MR_FaceMap ** MR_CutMeshParameters_GetMutable_new2OldMap(MR_CutMeshParameters *_this)
MRC_API MR_NewEdgesMap ** MR_CutMeshParameters_GetMutable_new2oldEdgesMap(MR_CutMeshParameters *_this)
MRC_API MR_expected_MR_FaceBitSet_std_string * MR_cutMeshByContour(MR_Mesh *mesh, const MR_std_vector_MR_Vector3f *contour, const MR_AffineXf3f *xf)
MRC_API MR_CutByProjectionSettings * MR_CutByProjectionSettings_DefaultConstructArray(size_t num_elems)
MRC_API MR_NewEdgesMap * MR_NewEdgesMap_DefaultConstructArray(size_t num_elems)
MRC_API void MR_CutMeshResult_Set_resultCut(MR_CutMeshResult *_this, MR_PassBy value_pass_by, MR_std_vector_std_vector_MR_EdgeId *value)
MRC_API void MR_CutMeshParameters_DestroyArray(const MR_CutMeshParameters *_this)
Destroys a heap-allocated array of MR_CutMeshParameters. Does nothing if the pointer is null.
MRC_API MR_NewEdgesMap *const * MR_CutMeshParameters_Get_new2oldEdgesMap(const MR_CutMeshParameters *_this)
MRC_API void MR_CutByProjectionSettings_Set_direction(MR_CutByProjectionSettings *_this, MR_Vector3f value)
MRC_API MR_CutMeshParameters * MR_CutMeshParameters_ConstructFromAnother(const MR_CutMeshParameters *_other)
MRC_API const MR_AffineXf3f ** MR_CutByProjectionSettings_GetMutable_cont2mesh(MR_CutByProjectionSettings *_this)
MRC_API MR_CutMeshParameters * MR_CutMeshParameters_DefaultConstruct(void)
MRC_API void MR_NewEdgesMap_Set_splitEdges(MR_NewEdgesMap *_this, MR_PassBy value_pass_by, MR_UndirectedEdgeBitSet *value)
MRC_API MR_expected_MR_FaceBitSet_std_string * MR_cutMeshByContours(MR_Mesh *mesh, const MR_std_vector_std_vector_MR_Vector3f *contours, const MR_AffineXf3f *xf)
MRC_API MR_CutByProjectionSettings * MR_CutByProjectionSettings_AssignFromAnother(MR_CutByProjectionSettings *_this, const MR_CutByProjectionSettings *_other)
MRC_API const MR_UndirectedEdgeBitSet * MR_NewEdgesMap_Get_splitEdges(const MR_NewEdgesMap *_this)
MRC_API MR_expected_std_vector_MR_OneMeshContour_std_string * MR_convertMeshTriPointsSurfaceOffsetToMeshContours_std_function_float_func_from_int(const MR_Mesh *mesh, const MR_std_vector_MR_MeshTriPoint *surfaceLine, const MR_std_function_float_from_int *offsetAtPoint, const MR_SearchPathSettings *searchSettings)
Makes continuous contour by iso-line from mesh tri points, if first and last meshTriPoint is the same...
struct MR_CutByProjectionSettings MR_CutByProjectionSettings
Definition MRContoursCut.h:69
struct MR_expected_std_vector_MR_OneMeshContour_std_string MR_expected_std_vector_MR_OneMeshContour_std_string
Definition MRContoursCut.h:21
MRC_API const MR_phmap_flat_hash_map_MR_UndirectedEdgeId_int * MR_NewEdgesMap_Get_map(const MR_NewEdgesMap *_this)
MRC_API MR_phmap_flat_hash_map_MR_UndirectedEdgeId_int * MR_NewEdgesMap_GetMutable_map(MR_NewEdgesMap *_this)
MRC_API MR_CutMeshResult * MR_CutMeshResult_ConstructFrom(MR_PassBy resultCut_pass_by, MR_std_vector_std_vector_MR_EdgeId *resultCut, MR_PassBy fbsWithContourIntersections_pass_by, MR_FaceBitSet *fbsWithContourIntersections)
MRC_API void MR_CutMeshResult_Set_fbsWithContourIntersections(MR_CutMeshResult *_this, MR_PassBy value_pass_by, MR_FaceBitSet *value)
MRC_API const MR_CutMeshParameters * MR_CutMeshParameters_OffsetPtr(const MR_CutMeshParameters *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_NewEdgesMap * MR_NewEdgesMap_OffsetMutablePtr(MR_NewEdgesMap *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 const MR_FaceBitSet * MR_CutMeshResult_Get_fbsWithContourIntersections(const MR_CutMeshResult *_this)
MRC_API MR_CutMeshResult * MR_CutMeshResult_OffsetMutablePtr(MR_CutMeshResult *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_CutMeshParameters MR_CutMeshParameters
Generated from class MR::CutMeshParameters.
Definition MRContoursCut.h:44
MRC_API MR_Vector3f * MR_CutByProjectionSettings_GetMutable_direction(MR_CutByProjectionSettings *_this)
MRC_API MR_CutMeshParameters * MR_CutMeshParameters_ConstructFrom(const MR_SortIntersectionsData *sortData, MR_FaceMap *new2OldMap, MR_CutMeshParameters_ForceFill forceFillMode, MR_NewEdgesMap *new2oldEdgesMap)
struct MR_NewEdgesMap MR_NewEdgesMap
Definition MRContoursCut.h:34
MRC_API const MR_CutMeshResult * MR_CutMeshResult_OffsetPtr(const MR_CutMeshResult *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_expected_MR_FaceBitSet_std_string MR_expected_MR_FaceBitSet_std_string
Definition MRContoursCut.h:20
MRC_API void MR_CutByProjectionSettings_Set_cont2mesh(MR_CutByProjectionSettings *_this, const MR_AffineXf3f *value)
MRC_API const MR_SortIntersectionsData ** MR_CutMeshParameters_GetMutable_sortData(MR_CutMeshParameters *_this)
MRC_API MR_NewEdgesMap * MR_NewEdgesMap_ConstructFrom(MR_PassBy splitEdges_pass_by, MR_UndirectedEdgeBitSet *splitEdges, MR_PassBy map_pass_by, MR_phmap_flat_hash_map_MR_UndirectedEdgeId_int *map)
struct MR_SearchPathSettings MR_SearchPathSettings
Definition MRContoursCut.h:17
MRC_API const MR_CutMeshParameters_ForceFill * MR_CutMeshParameters_Get_forceFillMode(const MR_CutMeshParameters *_this)
MRC_API void MR_CutMeshParameters_Set_new2oldEdgesMap(MR_CutMeshParameters *_this, MR_NewEdgesMap *value)
MRC_API MR_NewEdgesMap * MR_NewEdgesMap_ConstructFromAnother(MR_PassBy _other_pass_by, MR_NewEdgesMap *_other)
MRC_API MR_CutMeshParameters * MR_CutMeshParameters_OffsetMutablePtr(MR_CutMeshParameters *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_CutByProjectionSettings * MR_CutByProjectionSettings_DefaultConstruct(void)
MRC_API const MR_AffineXf3f *const * MR_CutByProjectionSettings_Get_cont2mesh(const MR_CutByProjectionSettings *_this)
MRC_API const MR_NewEdgesMap * MR_NewEdgesMap_OffsetPtr(const MR_NewEdgesMap *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_std_function_float_from_int MR_std_function_float_from_int
Definition MRContoursCut.h:24
MRC_API const MR_SortIntersectionsData *const * MR_CutMeshParameters_Get_sortData(const MR_CutMeshParameters *_this)
MRC_API MR_NewEdgesMap * MR_NewEdgesMap_AssignFromAnother(MR_NewEdgesMap *_this, MR_PassBy _other_pass_by, MR_NewEdgesMap *_other)
MRC_API void MR_CutMeshResult_DestroyArray(const MR_CutMeshResult *_this)
Destroys a heap-allocated array of MR_CutMeshResult. Does nothing if the pointer is null.
struct MR_phmap_flat_hash_map_MR_UndirectedEdgeId_int MR_phmap_flat_hash_map_MR_UndirectedEdgeId_int
Definition MRContoursCut.h:23
MRC_API MR_CutMeshResult * MR_CutMeshResult_AssignFromAnother(MR_CutMeshResult *_this, MR_PassBy _other_pass_by, MR_CutMeshResult *_other)
MRC_API void MR_CutByProjectionSettings_DestroyArray(const MR_CutByProjectionSettings *_this)
Destroys a heap-allocated array of MR_CutByProjectionSettings. Does nothing if the pointer is null.
MRC_API void MR_NewEdgesMap_Set_map(MR_NewEdgesMap *_this, MR_PassBy value_pass_by, MR_phmap_flat_hash_map_MR_UndirectedEdgeId_int *value)
MRC_API MR_CutMeshResult * MR_CutMeshResult_DefaultConstructArray(size_t num_elems)
struct MR_SortIntersectionsData MR_SortIntersectionsData
Definition MRContoursCut.h:18
MRC_API void MR_NewEdgesMap_Destroy(const MR_NewEdgesMap *_this)
Destroys a heap-allocated instance of MR_NewEdgesMap. Does nothing if the pointer is null.
MRC_API const MR_std_vector_std_vector_MR_EdgeId * MR_CutMeshResult_Get_resultCut(const MR_CutMeshResult *_this)
MRC_API MR_CutMeshParameters * MR_CutMeshParameters_AssignFromAnother(MR_CutMeshParameters *_this, const MR_CutMeshParameters *_other)
MRC_API void MR_NewEdgesMap_DestroyArray(const MR_NewEdgesMap *_this)
Destroys a heap-allocated array of MR_NewEdgesMap. Does nothing if the pointer is null.
MRC_API void MR_CutMeshParameters_Destroy(const MR_CutMeshParameters *_this)
Destroys a heap-allocated instance of MR_CutMeshParameters. Does nothing if the pointer is null.
MRC_API void MR_CutMeshParameters_Set_forceFillMode(MR_CutMeshParameters *_this, MR_CutMeshParameters_ForceFill value)
MRC_API MR_NewEdgesMap * MR_NewEdgesMap_DefaultConstruct(void)
MR_CutMeshParameters_ForceFill
Definition MRContoursCut.h:51
@ MR_CutMeshParameters_ForceFill_All
Definition MRContoursCut.h:57
@ MR_CutMeshParameters_ForceFill_Good
Definition MRContoursCut.h:55
@ MR_CutMeshParameters_ForceFill_None
Definition MRContoursCut.h:53
MRC_API MR_CutMeshParameters_ForceFill * MR_CutMeshParameters_GetMutable_forceFillMode(MR_CutMeshParameters *_this)
MRC_API MR_std_vector_std_vector_MR_EdgeId * MR_CutMeshResult_GetMutable_resultCut(MR_CutMeshResult *_this)
MRC_API MR_CutMeshResult * MR_CutMeshResult_DefaultConstruct(void)
MRC_API void MR_CutMeshParameters_Set_new2OldMap(MR_CutMeshParameters *_this, MR_FaceMap *value)
MRC_API const MR_Vector3f * MR_CutByProjectionSettings_Get_direction(const MR_CutByProjectionSettings *_this)
MRC_API MR_CutByProjectionSettings * MR_CutByProjectionSettings_OffsetMutablePtr(MR_CutByProjectionSettings *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_CutMeshParameters * MR_CutMeshParameters_DefaultConstructArray(size_t num_elems)
MRC_API MR_FaceMap *const * MR_CutMeshParameters_Get_new2OldMap(const MR_CutMeshParameters *_this)
struct MR_expected_std_vector_std_vector_MR_EdgeId_std_string MR_expected_std_vector_std_vector_MR_EdgeId_std_string
Definition MRContoursCut.h:22
MRC_API void MR_CutMeshParameters_Set_sortData(MR_CutMeshParameters *_this, const MR_SortIntersectionsData *value)
struct MR_Mesh MR_Mesh
Definition MRCtm.h:12
MR_PassBy
Definition common.h:19
#define MRC_API
Definition exports.h:11
Definition MRAffineXf.h:36
Definition MRVector3.h:50