MeshLib C++ Docs
Loading...
Searching...
No Matches
MRPolylineTrimWithPlane.h
Go to the documentation of this file.
1#pragma once
2#include "MRMeshFwd.h"
3
4namespace MR
5{
12MRMESH_API UndirectedEdgeBitSet subdivideWithPlane( Polyline3& polyline, const Plane3f& plane, EdgeBitSet* newPositiveEdges = {}, std::function<void( EdgeId, EdgeId, float )> onEdgeSplitCallback = {} );
13[[deprecated]] MRMESH_API UndirectedEdgeBitSet subdividePolylineWithPlane( Polyline3& polyline, const Plane3f& plane, std::function<void( EdgeId, EdgeId, float )> onEdgeSplitCallback = {} );
14
16{
18 std::function<void( EdgeId, EdgeId, float )> onEdgeSplitCallback;
21 bool closeLineAfterCut = false;
23 VertMap* outVmap = nullptr;
25 EdgeMap* outEmap = nullptr;
27 Polyline3* otherPart = nullptr;
29 VertMap* otherOutVmap = nullptr;
31 EdgeMap* otherOutEmap = nullptr;
32};
33
38MRMESH_API void trimWithPlane( Polyline3& polyline, const Plane3f& plane, const DividePolylineParameters& params = {} );
39[[deprecated]] MRMESH_API void dividePolylineWithPlane( Polyline3& polyline, const Plane3f& plane, const DividePolylineParameters& params = {} );
40
48MRMESH_API std::vector<EdgeSegment> extractSectionsFromPolyline( const Polyline3& polyline, const Plane3f& plane, float eps, UndirectedEdgeBitSet* positiveEdges = {} );
49
50}
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:79
MRMESH_API void dividePolylineWithPlane(Polyline3 &polyline, const Plane3f &plane, const DividePolylineParameters &params={})
MRMESH_API UndirectedEdgeBitSet subdividePolylineWithPlane(Polyline3 &polyline, const Plane3f &plane, std::function< void(EdgeId, EdgeId, float)> onEdgeSplitCallback={})
MRMESH_API FaceBitSet subdivideWithPlane(Mesh &mesh, const Plane3f &plane, FaceHashMap *new2Old=nullptr, float eps=0, std::function< void(EdgeId, EdgeId, float)> onEdgeSplitCallback=nullptr)
MRMESH_API std::vector< EdgeSegment > extractSectionsFromPolyline(const Polyline3 &polyline, const Plane3f &plane, float eps, UndirectedEdgeBitSet *positiveEdges={})
MRMESH_API void trimWithPlane(Mesh &mesh, const Plane3f &plane, UndirectedEdgeBitSet *outCutEdges=nullptr, FaceHashMap *new2Old=nullptr, float eps=0, std::function< void(EdgeId, EdgeId, float)> onEdgeSplitCallback=nullptr)
trim mesh by plane
Definition MRPolylineTrimWithPlane.h:16
VertMap * outVmap
map from input polyline verts to output
Definition MRPolylineTrimWithPlane.h:23
EdgeMap * otherOutEmap
map from input polyline edges to other output
Definition MRPolylineTrimWithPlane.h:31
EdgeMap * outEmap
map from input polyline edges to output
Definition MRPolylineTrimWithPlane.h:25
std::function< void(EdgeId, EdgeId, float)> onEdgeSplitCallback
onEdgeSplitCallback is invoked each time when an edge is split. Receives edge ID before split,...
Definition MRPolylineTrimWithPlane.h:18
VertMap * otherOutVmap
map from input polyline verts to other output
Definition MRPolylineTrimWithPlane.h:29
bool closeLineAfterCut
Definition MRPolylineTrimWithPlane.h:21
Polyline3 * otherPart
otherPart Optional return, polyline composed from edges on the negative side of the plane
Definition MRPolylineTrimWithPlane.h:27