mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-09-26 12:33:11 +08:00

* 1. Remove all global include_directories. * 2. Move 3d party dependencies from src to budled deps if possible. * Unify and enforce one way of including headers: e.g. #include "libslic3r/GCode.hpp" vs #include "GCode.hpp" (always use the "libslic3r/GCode.hpp" option). * Make all dependencies (also header only) a cmake target.
68 lines
2.2 KiB
C++
68 lines
2.2 KiB
C++
#ifndef IGL_COPYLEFT_CGAL_WIRE_MESH_H
|
|
#define IGL_COPYLEFT_CGAL_WIRE_MESH_H
|
|
#include "../../igl_inline.h"
|
|
#include <Eigen/Core>
|
|
namespace igl
|
|
{
|
|
namespace copyleft
|
|
{
|
|
namespace cgal
|
|
{
|
|
// Construct a "wire" or "wireframe" or "strut" surface mesh, given a
|
|
// one-dimensional network of straight edges.
|
|
//
|
|
// Inputs:
|
|
// WV #WV by 3 list of vertex positions
|
|
// WE #WE by 2 list of edge indices into WV
|
|
// th diameter thickness of wire
|
|
// poly_size number of sides on each wire (e.g., 4 would produce wires by
|
|
// connecting rectangular prisms).
|
|
// solid whether to resolve self-intersections to
|
|
// create a "solid" output mesh (cf., [Zhou et al. 2016]
|
|
// Outputs:
|
|
// V #V by 3 list of output vertices
|
|
// F #F by 3 list of output triangle indices into V
|
|
// J #F list of indices into [0,#WV+#WE) revealing "birth simplex" of
|
|
// output faces J(j) < #WV means the face corresponds to the J(j)th
|
|
// vertex in WV. J(j) >= #WV means the face corresponds to the
|
|
// (J(j)-#WV)th edge in WE.
|
|
template <
|
|
typename DerivedWV,
|
|
typename DerivedWE,
|
|
typename DerivedV,
|
|
typename DerivedF,
|
|
typename DerivedJ>
|
|
IGL_INLINE void wire_mesh(
|
|
const Eigen::MatrixBase<DerivedWV> & WV,
|
|
const Eigen::MatrixBase<DerivedWE> & WE,
|
|
const double th,
|
|
const int poly_size,
|
|
const bool solid,
|
|
Eigen::PlainObjectBase<DerivedV> & V,
|
|
Eigen::PlainObjectBase<DerivedF> & F,
|
|
Eigen::PlainObjectBase<DerivedJ> & J);
|
|
// Default with solid=true
|
|
template <
|
|
typename DerivedWV,
|
|
typename DerivedWE,
|
|
typename DerivedV,
|
|
typename DerivedF,
|
|
typename DerivedJ>
|
|
IGL_INLINE void wire_mesh(
|
|
const Eigen::MatrixBase<DerivedWV> & WV,
|
|
const Eigen::MatrixBase<DerivedWE> & WE,
|
|
const double th,
|
|
const int poly_size,
|
|
Eigen::PlainObjectBase<DerivedV> & V,
|
|
Eigen::PlainObjectBase<DerivedF> & F,
|
|
Eigen::PlainObjectBase<DerivedJ> & J);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
#ifndef IGL_STATIC_LIBRARY
|
|
# include "wire_mesh.cpp"
|
|
#endif
|
|
#endif
|