MeshLib C++ Docs
Loading...
Searching...
No Matches
MRPolylineTrimWithPlane.h
Go to the documentation of this file.
1#pragma once
2#include "MRPch/MRBindingMacros.h"
3#include "MRMeshFwd.h"
4
5namespace MR
6{
13MRMESH_API UndirectedEdgeBitSet subdivideWithPlane( Polyline3& polyline, const Plane3f& plane, EdgeBitSet* newPositiveEdges = {}, std::function<void( EdgeId, EdgeId, float )> onEdgeSplitCallback = {} );
14[[deprecated]] MRMESH_API MR_BIND_IGNORE UndirectedEdgeBitSet subdividePolylineWithPlane( Polyline3& polyline, const Plane3f& plane, std::function<void( EdgeId, EdgeId, float )> onEdgeSplitCallback = {} );
15
17{
19 std::function<void( EdgeId, EdgeId, float )> onEdgeSplitCallback;
22 bool closeLineAfterCut = false;
24 VertMap* outVmap = nullptr;
26 EdgeMap* outEmap = nullptr;
28 Polyline3* otherPart = nullptr;
30 VertMap* otherOutVmap = nullptr;
32 EdgeMap* otherOutEmap = nullptr;
33};
34
39MRMESH_API void trimWithPlane( Polyline3& polyline, const Plane3f& plane, const DividePolylineParameters& params = {} );
40[[deprecated]] MRMESH_API MR_BIND_IGNORE void dividePolylineWithPlane( Polyline3& polyline, const Plane3f& plane, const DividePolylineParameters& params = {} );
41
49MRMESH_API std::vector<EdgeSegment> extractSectionsFromPolyline( const Polyline3& polyline, const Plane3f& plane, float eps, UndirectedEdgeBitSet* positiveEdges = {} );
50
51}
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:80
Definition MRCameraOrientationPlugin.h:8
MRMESH_API MR_BIND_IGNORE 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
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 MR_BIND_IGNORE void dividePolylineWithPlane(Polyline3 &polyline, const Plane3f &plane, const DividePolylineParameters &params={})
MRMESH_API MR_BIND_IGNORE UndirectedEdgeBitSet subdividePolylineWithPlane(Polyline3 &polyline, const Plane3f &plane, std::function< void(EdgeId, EdgeId, float)> onEdgeSplitCallback={})
std::array< Vector3f, 3 > MR_BIND_IGNORE
Definition MRMeshBuilderTypes.h:10
MRMESH_API std::vector< EdgeSegment > extractSectionsFromPolyline(const Polyline3 &polyline, const Plane3f &plane, float eps, UndirectedEdgeBitSet *positiveEdges={})
Definition MRPolylineTrimWithPlane.h:17
VertMap * outVmap
map from input polyline verts to output
Definition MRPolylineTrimWithPlane.h:24
EdgeMap * otherOutEmap
map from input polyline edges to other output
Definition MRPolylineTrimWithPlane.h:32
EdgeMap * outEmap
map from input polyline edges to output
Definition MRPolylineTrimWithPlane.h:26
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:19
VertMap * otherOutVmap
map from input polyline verts to other output
Definition MRPolylineTrimWithPlane.h:30
bool closeLineAfterCut
Definition MRPolylineTrimWithPlane.h:22
Polyline3 * otherPart
otherPart Optional return, polyline composed from edges on the negative side of the plane
Definition MRPolylineTrimWithPlane.h:28