MeshLib
 
Loading...
Searching...
No Matches
MRPolylineTrimWithPlane.h
Go to the documentation of this file.
1#pragma once
2#pragma once
3#include "MRMeshFwd.h"
4
5namespace MR
6{
12MRMESH_API EdgeBitSet subdividePolylineWithPlane( Polyline3& polyline, const Plane3f& plane, std::function<void( EdgeId, EdgeId, float )> onEdgeSplitCallback = nullptr );
13
15{
17 std::function<void( EdgeId, EdgeId, float )> onEdgeSplitCallback;
19 bool fillAfterCut = false;
21 VertMap* outVmap = nullptr;
23 EdgeMap* outEmap = nullptr;
25 Polyline3* otherPart = nullptr;
29 EdgeMap* otherOutEmap = nullptr;
30};
31
36MRMESH_API void dividePolylineWithPlane( Polyline3& polyline, const Plane3f& plane, const DividePolylineParameters& params = {} );
37
43MRMESH_API std::vector<EdgeSegment> extractSectionsFromPolyline( const Polyline3& polyline, const Plane3f& plane, float eps );
44
45}
List< VertId > VertMap
Definition MRDotNet/MRMeshFwd.h:84
int EdgeId
Definition MRDotNet/MRMeshFwd.h:52
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
Definition MRCameraOrientationPlugin.h:7
MRMESH_API void dividePolylineWithPlane(Polyline3 &polyline, const Plane3f &plane, const DividePolylineParameters &params={})
MRMESH_API EdgeBitSet subdividePolylineWithPlane(Polyline3 &polyline, const Plane3f &plane, std::function< void(EdgeId, EdgeId, float)> onEdgeSplitCallback=nullptr)
MRMESH_API std::vector< EdgeSegment > extractSectionsFromPolyline(const Polyline3 &polyline, const Plane3f &plane, float eps)
Definition MRPolylineTrimWithPlane.h:15
VertMap * outVmap
map from input polyline verts to output
Definition MRPolylineTrimWithPlane.h:21
EdgeMap * otherOutEmap
map from input polyline edges to other output
Definition MRPolylineTrimWithPlane.h:29
bool fillAfterCut
fillAfterCut if true, the ends of resulting polyline will be united with new edges
Definition MRPolylineTrimWithPlane.h:19
EdgeMap * outEmap
map from input polyline edges to output
Definition MRPolylineTrimWithPlane.h:23
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:17
VertMap * otherOutVmap
map from input polyline verts to other output
Definition MRPolylineTrimWithPlane.h:27
Polyline3 * otherPart
otherPart Optional return, polyline composed from edges on the negative side of the plane
Definition MRPolylineTrimWithPlane.h:25