MeshLib C++ Docs
Loading...
Searching...
No Matches
MRExtractIsolines.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
4#include "MRExpected.h"
5#include "MREnums.h"
6
7namespace MR
8{
9
11[[nodiscard]] MRMESH_API IsoLines extractIsolines( const MeshTopology & topology,
12 const VertMetric & vertValues, const FaceBitSet * region = nullptr );
13
15[[nodiscard]] MRMESH_API bool hasAnyIsoline( const MeshTopology & topology,
16 const VertMetric & vertValues, const FaceBitSet * region = nullptr );
17
19[[nodiscard]] MRMESH_API IsoLines extractIsolines( const MeshTopology & topology,
20 const VertScalars & vertValues, float isoValue, const FaceBitSet * region = nullptr );
21
23[[nodiscard]] MRMESH_API bool hasAnyIsoline( const MeshTopology & topology,
24 const VertScalars & vertValues, float isoValue, const FaceBitSet * region = nullptr );
25
27[[nodiscard]] MRMESH_API PlaneSections extractPlaneSections( const MeshPart & mp, const Plane3f & plane );
28
30[[nodiscard]] MRMESH_API bool hasAnyPlaneSection( const MeshPart & mp, const Plane3f & plane );
31
35[[nodiscard]] MRMESH_API PlaneSections extractXYPlaneSections( const MeshPart & mp, float zLevel );
36
38[[nodiscard]] MRMESH_API bool hasAnyXYPlaneSection( const MeshPart & mp, float zLevel );
39
45[[nodiscard]] MRMESH_API std::vector<LineSegm3f> findTriangleSectionsByXYPlane( const MeshPart & mp, float zLevel,
46 std::vector<FaceId> * faces = nullptr, UseAABBTree u = UseAABBTree::Yes );
47
53[[nodiscard]] MRMESH_API PlaneSection trackSection( const MeshPart& mp,
54 const MeshTriPoint& start, MeshTriPoint& end, const Vector3f& direction, float distance );
55
60[[nodiscard]] MRMESH_API Expected<PlaneSection> trackSection( const MeshPart& mp,
61 const MeshTriPoint& start, const MeshTriPoint& end, const Vector3f& planePoint, bool ccw );
62
65[[nodiscard]] MRMESH_API bool isConsistentlyOriented( const MeshTopology & topology, const IsoLine & isoline );
66
68[[nodiscard]] MRMESH_API FaceBitSet getCrossedFaces( const MeshTopology & topology, const IsoLine & isoline );
69
71[[nodiscard]] MRMESH_API Contour2f planeSectionToContour2f( const Mesh & mesh, const PlaneSection & section, const AffineXf3f & meshToPlane );
72
73[[nodiscard]] MRMESH_API Contours2f planeSectionsToContours2f( const Mesh & mesh, const PlaneSections & sections, const AffineXf3f & meshToPlane );
74
75} //namespace MR
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:79
Definition MRMesh/MRMeshTopology.h:18
MR_BIND_IGNORE auto end(const BitSet &)
Definition MRMesh/MRBitSet.h:297
std::optional< T > distance(const Plane3< T > &plane1, const Plane3< T > &plane2, T errorLimit=std::numeric_limits< T >::epsilon() *T(20))
Definition MRIntersection.h:104
MRMESH_API bool ccw(const Vector2i &a, const Vector2i &b)
std::function< float(VertId)> VertMetric
Definition MRMesh/MRMeshFwd.h:481
MRMESH_API IsoLines extractIsolines(const MeshTopology &topology, const VertMetric &vertValues, const FaceBitSet *region=nullptr)
extracts all iso-lines from given scalar field and iso-value=0
MRMESH_API PlaneSections extractXYPlaneSections(const MeshPart &mp, float zLevel)
MRMESH_API PlaneSection trackSection(const MeshPart &mp, const MeshTriPoint &start, MeshTriPoint &end, const Vector3f &direction, float distance)
MRMESH_API PlaneSections extractPlaneSections(const MeshPart &mp, const Plane3f &plane)
extracts all plane sections of given mesh
Contour2< float > Contour2f
Definition MRMesh/MRMeshFwd.h:308
MRMESH_API Contour2f planeSectionToContour2f(const Mesh &mesh, const PlaneSection &section, const AffineXf3f &meshToPlane)
converts PlaneSections in 2D contours by computing coordinate of each point, applying given xf to it,...
SurfacePaths PlaneSections
Definition MRMesh/MRMeshFwd.h:400
MRMESH_API Contours2f planeSectionsToContours2f(const Mesh &mesh, const PlaneSections &sections, const AffineXf3f &meshToPlane)
tl::expected< T, E > Expected
Definition MRExpected.h:59
SurfacePath IsoLine
Definition MRMesh/MRMeshFwd.h:397
MRMESH_API FaceBitSet getCrossedFaces(const MeshTopology &topology, const IsoLine &isoline)
for a consistently oriented isoline, returns all faces it goes inside
MRMESH_API bool hasAnyPlaneSection(const MeshPart &mp, const Plane3f &plane)
quickly returns true if extractPlaneSections produce not-empty set for the same arguments
Contours2< float > Contours2f
Definition MRMesh/MRMeshFwd.h:316
SurfacePath PlaneSection
Definition MRMesh/MRMeshFwd.h:399
MRMESH_API bool hasAnyXYPlaneSection(const MeshPart &mp, float zLevel)
quickly returns true if extractXYPlaneSections produce not-empty set for the same arguments
SurfacePaths IsoLines
Definition MRMesh/MRMeshFwd.h:398
MRMESH_API std::vector< LineSegm3f > findTriangleSectionsByXYPlane(const MeshPart &mp, float zLevel, std::vector< FaceId > *faces=nullptr, UseAABBTree u=UseAABBTree::Yes)
MRMESH_API bool isConsistentlyOriented(const MeshTopology &topology, const IsoLine &isoline)
MRMESH_API bool hasAnyIsoline(const MeshTopology &topology, const VertMetric &vertValues, const FaceBitSet *region=nullptr)
quickly returns true if extractIsolines produce not-empty set for the same arguments
UseAABBTree
Definition MREnums.h:56
Definition MRMesh/MRMeshTriPoint.h:23
Definition MRMesh/MRMesh.h:23