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{
11
12
14[[nodiscard]] MRMESH_API IsoLines extractIsolines( const MeshTopology & topology,
15 const VertMetric & vertValues, const FaceBitSet * region = nullptr );
16
18[[nodiscard]] MRMESH_API bool hasAnyIsoline( const MeshTopology & topology,
19 const VertMetric & vertValues, const FaceBitSet * region = nullptr );
20
22[[nodiscard]] MRMESH_API IsoLines extractIsolines( const MeshTopology & topology,
23 const VertScalars & vertValues, float isoValue, const FaceBitSet * region = nullptr );
24
26[[nodiscard]] MRMESH_API bool hasAnyIsoline( const MeshTopology & topology,
27 const VertScalars & vertValues, float isoValue, const FaceBitSet * region = nullptr );
28
30[[nodiscard]] MRMESH_API PlaneSections extractPlaneSections( const MeshPart & mp, const Plane3f & plane, UseAABBTree u = UseAABBTree::Yes );
31
33[[nodiscard]] MRMESH_API bool hasAnyPlaneSection( const MeshPart & mp, const Plane3f & plane, UseAABBTree u = UseAABBTree::Yes );
34
36[[nodiscard]] MRMESH_API PlaneSections extractXYPlaneSections( const MeshPart & mp, float zLevel, UseAABBTree u = UseAABBTree::Yes );
37
39[[nodiscard]] MRMESH_API bool hasAnyXYPlaneSection( const MeshPart & mp, float zLevel, UseAABBTree u = UseAABBTree::Yes );
40
46[[nodiscard]] MRMESH_API std::vector<LineSegm3f> findTriangleSectionsByXYPlane( const MeshPart & mp, float zLevel,
47 std::vector<FaceId> * faces = nullptr, UseAABBTree u = UseAABBTree::Yes );
48
54[[nodiscard]] MRMESH_API PlaneSection trackSection( const MeshPart& mp,
55 const MeshTriPoint& start, MeshTriPoint& end, const Vector3f& direction, float distance );
56
61[[nodiscard]] MRMESH_API Expected<PlaneSection> trackSection( const MeshPart& mp,
62 const MeshTriPoint& start, const MeshTriPoint& end, const Vector3f& planePoint, bool ccw );
63
66[[nodiscard]] MRMESH_API bool isConsistentlyOriented( const MeshTopology & topology, const IsoLine & isoline );
67
69[[nodiscard]] MRMESH_API FaceBitSet getCrossedFaces( const MeshTopology & topology, const IsoLine & isoline );
70
72[[nodiscard]] MRMESH_API Contour2f planeSectionToContour2f( const Mesh & mesh, const PlaneSection & section, const AffineXf3f & meshToPlane );
73
74[[nodiscard]] MRMESH_API Contours2f planeSectionsToContours2f( const Mesh & mesh, const PlaneSections & sections, const AffineXf3f & meshToPlane );
75
76}
Definition MRMeshTopology.h:22
MR_BIND_IGNORE_PY auto end(const BitSet &)
Definition MRBitSet.h:397
MRMESH_API bool ccw(const Vector2i &a, const Vector2i &b)
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 bool hasAnyXYPlaneSection(const MeshPart &mp, float zLevel, UseAABBTree u=UseAABBTree::Yes)
quickly returns true if extractXYPlaneSections produce not-empty set for the same arguments
MRMESH_API bool hasAnyPlaneSection(const MeshPart &mp, const Plane3f &plane, UseAABBTree u=UseAABBTree::Yes)
quickly returns true if extractPlaneSections produce not-empty set for the same arguments
MRMESH_API PlaneSection trackSection(const MeshPart &mp, const MeshTriPoint &start, MeshTriPoint &end, const Vector3f &direction, float distance)
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,...
MRMESH_API Contours2f planeSectionsToContours2f(const Mesh &mesh, const PlaneSections &sections, const AffineXf3f &meshToPlane)
tl::expected< T, E > Expected
Definition MRExpected.h:31
MRMESH_API FaceBitSet getCrossedFaces(const MeshTopology &topology, const IsoLine &isoline)
for a consistently oriented isoline, returns all faces it goes inside
MRMESH_API PlaneSections extractXYPlaneSections(const MeshPart &mp, float zLevel, UseAABBTree u=UseAABBTree::Yes)
extracts all sections of given mesh with the plane z=zLevel
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 PlaneSections extractPlaneSections(const MeshPart &mp, const Plane3f &plane, UseAABBTree u=UseAABBTree::Yes)
extracts all plane sections of given mesh
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:92
@ direction
Length or size.
@ Yes
AABB-tree of the mesh will not be used, even if it is available.
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
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRMeshTriPoint.h:26
Definition MRMesh.h:23