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
36
42{
43 //< if bad faces occur does not fill anything
45 //< fills all faces except bad ones
47 //< fills all faces with bad ones, but on bad faces triangulation can also be bad (may have self-intersections or tunnels)
50
61
69
74
82
89MRC_API void MR_NewEdgesMap_Set_splitEdges(MR_NewEdgesMap *_this, MR_PassBy value_pass_by, MR_UndirectedEdgeBitSet *value);
90
98
107
116
125
129
134
140MRC_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);
141
144MRC_API const MR_NewEdgesMap *MR_NewEdgesMap_OffsetPtr(const MR_NewEdgesMap *ptr, ptrdiff_t i);
145
149
153MRC_API MR_NewEdgesMap *MR_NewEdgesMap_ConstructFromAnother(MR_PassBy _other_pass_by, MR_NewEdgesMap *_other);
154
156MRC_API void MR_NewEdgesMap_Destroy(const MR_NewEdgesMap *_this);
157
160
166MRC_API MR_NewEdgesMap *MR_NewEdgesMap_AssignFromAnother(MR_NewEdgesMap *_this, MR_PassBy _other_pass_by, MR_NewEdgesMap *_other);
167
176
185
194
201
208
215
221
227
233
240
247
254
258
263
272
276
280
286
289
292
300
307
313MRC_API void MR_CutMeshResult_Set_resultCut(MR_CutMeshResult *_this, MR_PassBy value_pass_by, MR_std_vector_std_vector_MR_EdgeId *value);
314
321
329
336MRC_API void MR_CutMeshResult_Set_fbsWithContourIntersections(MR_CutMeshResult *_this, MR_PassBy value_pass_by, MR_FaceBitSet *value);
337
345
349
354
360MRC_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);
361
364MRC_API const MR_CutMeshResult *MR_CutMeshResult_OffsetPtr(const MR_CutMeshResult *ptr, ptrdiff_t i);
365
369
374
377
380
387
411
424
437
444
451
458
465
472
479
483
488
495
499
503
509
512
515
523
539
554
570
571#ifdef __cplusplus
572} // extern "C"
573#endif
struct MR_std_vector_std_vector_MR_EdgeId MR_std_vector_std_vector_MR_EdgeId
Definition MR2DContoursTriangulation.h:18
struct MR_UndirectedEdgeBitSet MR_UndirectedEdgeBitSet
Definition MRAABBTreeBase.h:28
struct MR_FaceBitSet MR_FaceBitSet
Definition MRAABBTree.h:17
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)
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
Definition MRContoursCut.h:68
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:73
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)
MRC_API MR_NewEdgesMap * MR_NewEdgesMap_OffsetMutablePtr(MR_NewEdgesMap *ptr, ptrdiff_t i)
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)
struct MR_CutMeshParameters MR_CutMeshParameters
Definition MRContoursCut.h:60
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:35
MRC_API const MR_CutMeshResult * MR_CutMeshResult_OffsetPtr(const MR_CutMeshResult *ptr, ptrdiff_t i)
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)
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)
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:42
@ MR_CutMeshParameters_ForceFill_All
Definition MRContoursCut.h:48
@ MR_CutMeshParameters_ForceFill_Good
Definition MRContoursCut.h:46
@ MR_CutMeshParameters_ForceFill_None
Definition MRContoursCut.h:44
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)
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:16
Definition MRAffineXf.h:39
Generated from class MR::Vector3f.
Definition MRVector3.h:47