iMSTK
Interactive Medical Simulation Toolkit
imstkLineMeshCut.h
1 /*
2 ** This file is part of the Interactive Medical Simulation Toolkit (iMSTK)
3 ** iMSTK is distributed under the Apache License, Version 2.0.
4 ** See accompanying NOTICE for details.
5 */
6 
7 #pragma once
8 
9 #include "imstkMeshCut.h"
10 
11 namespace imstk
12 {
13 class ImplicitGeometry;
14 class LineMesh;
15 class SurfaceMesh;
16 
17 enum class SegmentCutType
18 {
19  NONE = 0,
20  EDGE = 1 // Edge split
21 };
22 
31 class LineMeshCut : public MeshCut
32 {
33 public:
34  LineMeshCut();
35  ~LineMeshCut() override = default;
36 
37  std::shared_ptr<LineMesh> getOutputMesh();
38  void setInputMesh(std::shared_ptr<LineMesh> mesh);
39 
40 protected:
41  void refinement(std::shared_ptr<AbstractCellMesh> outputGeom,
42  std::map<int, bool>& cutVerts) override;
43  void splitVerts(std::shared_ptr<AbstractCellMesh> outputGeom,
44  std::map<int, bool>& cutVerts,
45  std::shared_ptr<Geometry> cuttingGeom) override;
46 
47  std::shared_ptr<std::vector<CutData>> generateCutData(
48  std::shared_ptr<Geometry> cuttingGeom,
49  std::shared_ptr<AbstractCellMesh> geomToCut) override;
50 
51  std::shared_ptr<std::vector<CutData>> generateImplicitCutData(
52  std::shared_ptr<ImplicitGeometry> cuttingGeom,
53  std::shared_ptr<LineMesh> geomToCut);
54 
55  std::shared_ptr<std::vector<CutData>> generateSurfaceMeshCutData(
56  std::shared_ptr<SurfaceMesh> cuttingGeom,
57  std::shared_ptr<LineMesh> geomToCut);
58 };
59 } // namespace imstk
Compound Geometry.
Base abstract class for discrete cut algorithms.
Definition: imstkMeshCut.h:41
This filter cuts the lines of a LineMesh into smaller lines using input cutting geometry Only support...