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_OneMeshContours MR_OneMeshContours; // Defined in `#include <MRCMesh/MROneMeshContours.h>`.
18typedef struct MR_SearchPathSettings MR_SearchPathSettings; // Defined in `#include <MRCMesh/MROneMeshContours.h>`.
19typedef struct MR_SortIntersectionsData MR_SortIntersectionsData; // Defined in `#include <MRCMesh/MROneMeshContours.h>`.
20typedef struct MR_UndirectedEdgeBitSet MR_UndirectedEdgeBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
21typedef struct MR_expected_MR_FaceBitSet_std_string MR_expected_MR_FaceBitSet_std_string; // Defined in `#include <MRCMisc/expected_MR_FaceBitSet_std_string.h>`.
22typedef struct MR_expected_MR_OneMeshContours_std_string MR_expected_MR_OneMeshContours_std_string; // Defined in `#include <MRCMisc/expected_MR_OneMeshContours_std_string.h>`.
23typedef 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>`.
25typedef struct MR_std_function_float_from_int MR_std_function_float_from_int; // Defined in `#include <MRCMisc/std_function_float_from_int.h>`.
26typedef struct MR_std_vector_MR_MeshTriPoint MR_std_vector_MR_MeshTriPoint; // Defined in `#include <MRCMisc/std_vector_MR_MeshTriPoint.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
45
61
72
80
85
93
101
109
118
127
136
140
145
152
156
160
165
168
171
178
187
196
205
212
219
226
232
238
244
250
256
262
269
276
283
287
292
302
306
310
316
319
322
330
339
348
357
369
381
393
397
402
408MRC_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);
409
413
417
422
425
428
435
465
472MRC_API void MR_reserveForCut(MR_Mesh *mesh, const MR_Mesh *sizeOf, const MR_OneMeshContours *contours);
473
486
499
506
513
520
527
534
541
545
550
557
561
565
571
574
577
585
601
619
638
639// the old names stay in the bindings, since scripts call them
646MRC_DEPRECATED_REASON("use offsetSurfaceLineToMeshContours")
648
656MRC_DEPRECATED_REASON("use offsetSurfaceLineToMeshContours")
658
659#ifdef __cplusplus
660} // extern "C"
661#endif
struct MR_std_vector_std_vector_MR_EdgeId MR_std_vector_std_vector_MR_EdgeId
Definition MR2DContoursTriangulation.h:21
struct MR_UndirectedEdgeBitSet MR_UndirectedEdgeBitSet
Definition MRAABBTreeBase.h:25
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:27
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,...
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_MR_OneMeshContours_std_string * MR_offsetSurfaceLineToMeshContours_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...
MRC_API const MR_phmap_flat_hash_map_MR_UndirectedEdgeId_int_phmap_Hash_MR_UndirectedEdgeId_phmap_EqualTo_MR_UndirectedEdgeId_MR_Allocator_std_pair_const_MR_UndirectedEdgeId_int * MR_NewEdgesMap_Get_map(const MR_NewEdgesMap *_this)
MRC_API MR_expected_MR_OneMeshContours_std_string * MR_offsetSurfaceLineToMeshContours_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_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)
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_phmap_Hash_MR_UndirectedEdgeId_phmap_EqualTo_MR_UndirectedEdgeId_MR_Allocator_std_pair_const_MR_UndirectedEdgeId_int *map)
struct MR_CutMeshResult MR_CutMeshResult
Definition MRContoursCut.h:79
MRC_API MR_FaceMap ** MR_CutMeshParameters_GetMutable_new2OldMap(MR_CutMeshParameters *_this)
MRC_API void MR_reserveForCut(MR_Mesh *mesh, const MR_Mesh *sizeOf, const MR_OneMeshContours *contours)
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)
struct MR_CutByProjectionSettings MR_CutByProjectionSettings
Definition MRContoursCut.h:84
MRC_API MR_CutMeshResult * MR_cutMesh(MR_Mesh *mesh, const MR_OneMeshContours *contours, const MR_CutMeshParameters *params)
Cuts mesh by given contours.
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 MR_expected_MR_OneMeshContours_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)
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:71
MRC_API MR_Vector3f * MR_CutByProjectionSettings_GetMutable_direction(MR_CutByProjectionSettings *_this)
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:21
MRC_API void MR_CutByProjectionSettings_Set_cont2mesh(MR_CutByProjectionSettings *_this, const MR_AffineXf3f *value)
MRC_API MR_CutMeshParameters_FillPart * MR_CutMeshParameters_GetMutable_fillPart(MR_CutMeshParameters *_this)
MRC_API const MR_SortIntersectionsData ** MR_CutMeshParameters_GetMutable_sortData(MR_CutMeshParameters *_this)
struct MR_SearchPathSettings MR_SearchPathSettings
Definition MRContoursCut.h:18
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 void MR_CutMeshParameters_Set_fillPart(MR_CutMeshParameters *_this, MR_CutMeshParameters_FillPart value)
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:25
MRC_API const MR_SortIntersectionsData *const * MR_CutMeshParameters_Get_sortData(const MR_CutMeshParameters *_this)
struct MR_OneMeshContours MR_OneMeshContours
Special data type for MR::cutMesh: the intersections of all contours in one array,...
Definition MRContoursCut.h:17
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.
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 MR_CutMeshResult * MR_CutMeshResult_DefaultConstructArray(size_t num_elems)
struct MR_SortIntersectionsData MR_SortIntersectionsData
Definition MRContoursCut.h:19
MRC_API MR_CutMeshParameters * MR_CutMeshParameters_ConstructFrom(const MR_SortIntersectionsData *sortData, MR_FaceMap *new2OldMap, MR_CutMeshParameters_FillPart fillPart, MR_CutMeshParameters_ForceFill forceFillMode, MR_NewEdgesMap *new2oldEdgesMap)
MRC_API void MR_NewEdgesMap_Set_map(MR_NewEdgesMap *_this, MR_PassBy value_pass_by, MR_phmap_flat_hash_map_MR_UndirectedEdgeId_int_phmap_Hash_MR_UndirectedEdgeId_phmap_EqualTo_MR_UndirectedEdgeId_MR_Allocator_std_pair_const_MR_UndirectedEdgeId_int *value)
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.
struct MR_expected_MR_OneMeshContours_std_string MR_expected_MR_OneMeshContours_std_string
Definition MRContoursCut.h:22
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:55
@ MR_CutMeshParameters_ForceFill_SplitCrossings
Definition MRContoursCut.h:59
@ MR_CutMeshParameters_ForceFill_None
if bad faces occur, nothing is filled
Definition MRContoursCut.h:53
MRC_API MR_CutMeshParameters_ForceFill * MR_CutMeshParameters_GetMutable_forceFillMode(MR_CutMeshParameters *_this)
MRC_API MR_phmap_flat_hash_map_MR_UndirectedEdgeId_int_phmap_Hash_MR_UndirectedEdgeId_phmap_EqualTo_MR_UndirectedEdgeId_MR_Allocator_std_pair_const_MR_UndirectedEdgeId_int * MR_NewEdgesMap_GetMutable_map(MR_NewEdgesMap *_this)
MRC_API const MR_CutMeshParameters_FillPart * MR_CutMeshParameters_Get_fillPart(const MR_CutMeshParameters *_this)
struct MR_phmap_flat_hash_map_MR_UndirectedEdgeId_int_phmap_Hash_MR_UndirectedEdgeId_phmap_EqualTo_MR_UndirectedEdgeId_MR_Allocator_std_pair_const_MR_UndirectedEdgeId_int MR_phmap_flat_hash_map_MR_UndirectedEdgeId_int_phmap_Hash_MR_UndirectedEdgeId_phmap_EqualTo_MR_UndirectedEdgeId_MR_Allocator_std_pair_const_MR_UndirectedEdgeId_int
Definition MRContoursCut.h:24
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)
MR_CutMeshParameters_FillPart
Definition MRContoursCut.h:40
@ MR_CutMeshParameters_FillPart_Both
Definition MRContoursCut.h:41
@ MR_CutMeshParameters_FillPart_Right
Definition MRContoursCut.h:43
@ MR_CutMeshParameters_FillPart_Left
Definition MRContoursCut.h:42
MRC_API MR_expected_MR_OneMeshContours_std_string * MR_convertMeshTriPointsSurfaceOffsetToMeshContours_float(const MR_Mesh *mesh, const MR_std_vector_MR_MeshTriPoint *surfaceLine, float offset, const MR_SearchPathSettings *searchSettings)
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:23
MRC_API void MR_CutMeshParameters_Set_sortData(MR_CutMeshParameters *_this, const MR_SortIntersectionsData *value)
struct MR_Mesh MR_Mesh
Definition MRCtm.h:17
#define MRC_DEPRECATED_REASON(str)
Definition common.h:74
MR_PassBy
Definition common.h:13
#define MRC_API
Definition include/MRCMisc/exports.h:11
Definition MRAffineXf.h:39
Generated from class MR::Vector3f.
Definition MRVector3.h:47