28#ifndef BLOCK_LATTICE_STL_READER_H
29#define BLOCK_LATTICE_STL_READER_H
71 void indicate2_Xray();
76 void indicate2_Yray();
99 const std::string _fName;
111 std::vector<std::vector<STLtriangle<T>>> _trianglesInCuboidList;
113 std::vector<std::vector<std::vector<STLtriangle<T>>>> _neighbouringTriangleInCuboidList;
128 bool verbose =
false, T overlap=0., T max=0.);
139 BlockLatticeSTLreader(
const std::vector<std::vector<T>> meshPoints, T voxelSize, T stlSize=1,
int method=2,
140 bool verbose =
false, T overlap=0., T max=0.);
144 bool operator() (
bool output[],
const T input[])
override;
157 T signedDistance(const Vector<T,3>& input, STLtriangle<T>& _triangle);// override;*/
166 void writeSTL(std::string stlName=
"");
void writeSTL(std::string stlName="")
Writes STL mesh in Si units.
~BlockLatticeSTLreader() override
T signedDistance(int locC, const Vector< T, 3 > &input)
Computes signed distance to closest triangle in direction of the surface normal in local cuboid locC.
STLmesh< T > & getMesh()
Returns mesh.
void print()
Prints console output.
void writeOctree()
Writes Octree.
bool operator()(bool output[], const T input[]) override
Returns whether node is inside or not.
void setBoundaryInsideNodes()
Every octree leaf intersected by the STL will be part of the inside nodes.
BlockLatticeSTLreader(CuboidDecomposition3D< T > &cbg3d, LoadBalancer< T > &hlb, const std::string fName, T voxelSize, T stlSize=1, int method=2, bool verbose=false, T overlap=0., T max=0.)
Constructs a new BlockLatticeSTLreader from a file.
Octree< T > * getTree() const
Returns tree.
Vector< T, 3 > surfaceNormal(const Vector< T, 3 > &pos, const T meshSize=0) override
Finds and returns normal of the closest surface (triangle)
void createNeighbouringTriangleInCuboidVector()
Needed for the signed Distance function: Creates a list of neighbouring triangles for each triangle.
void setNormalsOutside()
Rearranges normals of triangles to point outside of geometry.
bool distance(T &distance, const Vector< T, 3 > &origin, const Vector< T, 3 > &direction, int iC=-1) override
Computes distance to closest triangle intersection.
IndicatorF3D is an application from .
Base class for all LoadBalancer.
class for marking output with some text
This file contains indicator functions.
Top level namespace for all of OpenLB.
efficient implementation of a vector class