OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
marchsq::ScalarField Struct Reference
Collaboration diagram for marchsq::ScalarField:

Public Member Functions

 ScalarField (const BoundingBox bb, const coordf_t z=0.0, const float period=10.0)
float get_scalar (coordf_t x, coordf_t y, coordf_t z) const
float get_scalar (Coord p) const
coord_t to_coord (const coordr_t &x) const
coordr_t to_coordr (const coord_t &x) const
Point to_Point (const Coord &p) const
Coord to_Coord (const Point &p) const
Pointf to_Pointf (const Point &p) const
Pointf to_Pointf (const Coord &p) const

Public Attributes

const coord_t rsize = scaled(rsizef)
const coordr_t gsize = std::round(gsizef / rsizef)
Point size
Point offs
coordf_t z
float freq
float isoval = 0.0

Static Public Attributes

static constexpr float gsizef = 0.40
static constexpr float rsizef = 0.004

Detailed Description

Constructor & Destructor Documentation

◆ ScalarField()

marchsq::ScalarField::ScalarField ( const BoundingBox bb,
const coordf_t z = 0.0,
const float period = 10.0 )
inlineexplicit
54 : size{bb.size()}, offs{bb.min}, z{z}, freq{float(2 * PI) / period}
55 {}
static constexpr double PI
Definition libslic3r.h:81
Point size
Definition FillTpmsFK.cpp:47
Point offs
Definition FillTpmsFK.cpp:48
coordf_t z
Definition FillTpmsFK.cpp:49
float freq
Definition FillTpmsFK.cpp:50

References freq, offs, PI, size, and z.

Member Function Documentation

◆ get_scalar() [1/2]

float marchsq::ScalarField::get_scalar ( Coord p) const
inline
62 {
63 Pointf pf = to_Pointf(p);
64 return get_scalar(pf.x(), pf.y(), z);
65 }
Vec2d Pointf
Definition FillGyroid.cpp:49
Pointf to_Pointf(const Point &p) const
Definition FillTpmsFK.cpp:74
float get_scalar(coordf_t x, coordf_t y, coordf_t z) const
Definition FillTpmsFK.cpp:58

References get_scalar(), to_Pointf(), and z.

Here is the call graph for this function:

◆ get_scalar() [2/2]

float marchsq::ScalarField::get_scalar ( coordf_t x,
coordf_t y,
coordf_t z ) const
inline
58{ return fischer_koch(freq * x, freq * y, freq * z); }
static float fischer_koch(float x, float y, float z)
Definition FillTpmsFK.cpp:27

References Slic3r::fischer_koch(), freq, and z.

Referenced by marchsq::_RasterTraits< ScalarField >::get(), and get_scalar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_Coord()

Coord marchsq::ScalarField::to_Coord ( const Point & p) const
inline
73{ return Coord(to_coordr(p.y() - offs.y()), to_coordr(p.x() - offs.x())); }
float Coord
Definition SkipPartCanvas.hpp:32
coordr_t to_coordr(const coord_t &x) const
Definition FillTpmsFK.cpp:69

References offs, and to_coordr().

Here is the call graph for this function:

◆ to_coord()

coord_t marchsq::ScalarField::to_coord ( const coordr_t & x) const
inline
68{ return x * rsize; }
const coord_t rsize
Definition FillTpmsFK.cpp:45

References rsize.

Referenced by to_Point().

Here is the caller graph for this function:

◆ to_coordr()

coordr_t marchsq::ScalarField::to_coordr ( const coord_t & x) const
inline
69{ return x / rsize; }

References rsize.

Referenced by marchsq::_RasterTraits< ScalarField >::cols(), marchsq::_RasterTraits< ScalarField >::rows(), and to_Coord().

Here is the caller graph for this function:

◆ to_Point()

Point marchsq::ScalarField::to_Point ( const Coord & p) const
inline
72{ return Point(to_coord(p.c) + offs.x(), to_coord(p.r) + offs.y()); }
Kernel::Point_3 Point
Definition MeshRepair.cpp:81
coord_t to_coord(const coordr_t &x) const
Definition FillTpmsFK.cpp:68

References marchsq::Coord::c, offs, marchsq::Coord::r, and to_coord().

Referenced by marchsq::get_polylines(), and to_Pointf().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_Pointf() [1/2]

Pointf marchsq::ScalarField::to_Pointf ( const Coord & p) const
inline
75{ return to_Pointf(to_Point(p)); }
Point to_Point(const Coord &p) const
Definition FillTpmsFK.cpp:72

References to_Point(), and to_Pointf().

Referenced by to_Pointf().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_Pointf() [2/2]

Pointf marchsq::ScalarField::to_Pointf ( const Point & p) const
inline
74{ return Pointf(unscaled(p.x()), unscaled(p.y())); }
constexpr Eigen::Matrix< Tout, 2, EigenArgs... > unscaled(const Slic3r::Point &v) noexcept
Definition Arrange.cpp:81

References Slic3r::unscaled().

Referenced by get_scalar().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ freq

float marchsq::ScalarField::freq

Referenced by ScalarField(), and get_scalar().

◆ gsize

const coordr_t marchsq::ScalarField::gsize = std::round(gsizef / rsizef)

◆ gsizef

float marchsq::ScalarField::gsizef = 0.40
staticconstexpr

◆ isoval

float marchsq::ScalarField::isoval = 0.0

Referenced by marchsq::get_polylines().

◆ offs

Point marchsq::ScalarField::offs

Referenced by ScalarField(), to_Coord(), and to_Point().

◆ rsize

const coord_t marchsq::ScalarField::rsize = scaled(rsizef)

Referenced by to_coord(), and to_coordr().

◆ rsizef

float marchsq::ScalarField::rsizef = 0.004
staticconstexpr

◆ size

◆ z

coordf_t marchsq::ScalarField::z

Referenced by ScalarField(), get_scalar(), and get_scalar().


The documentation for this struct was generated from the following file:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Fill/FillTpmsFK.cpp