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

Public Member Functions

 GyroidField (const BoundingBox bb, const coordf_t z, const float period, const float omega=1.0f)
float get_scalar (coordf_t x, coordf_t y, coordf_t z_arg) 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 fx
float fy
float fz
float isoval = 0.0f

Static Public Attributes

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

Detailed Description

Constructor & Destructor Documentation

◆ GyroidField()

marchsq::GyroidField::GyroidField ( const BoundingBox bb,
const coordf_t z,
const float period,
const float omega = 1.0f )
inlineexplicit
66 : size{bb.size()}, offs{bb.min}, z{z}
67 {
68 const float baseline = float(2.0 * PI) / std::max(period, 1e-3f);
69 fx = baseline;
70 fy = baseline;
71 fz = omega * baseline;
72 }
static constexpr double PI
Definition libslic3r.h:81
float fy
Definition FillGyroid.cpp:61
float fx
Definition FillGyroid.cpp:60
Point size
Definition FillGyroid.cpp:57
float fz
Definition FillGyroid.cpp:62
coordf_t z
Definition FillGyroid.cpp:59
Point offs
Definition FillGyroid.cpp:58

References fx, fy, fz, offs, PI, size, and z.

Member Function Documentation

◆ get_scalar() [1/2]

float marchsq::GyroidField::get_scalar ( Coord p) const
inline
80 {
81 Pointf pf = to_Pointf(p);
82 return get_scalar(pf.x(), pf.y(), z);
83 }
Vec2d Pointf
Definition FillGyroid.cpp:49
Pointf to_Pointf(const Point &p) const
Definition FillGyroid.cpp:89
float get_scalar(coordf_t x, coordf_t y, coordf_t z_arg) const
Definition FillGyroid.cpp:74

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

Here is the call graph for this function:

◆ get_scalar() [2/2]

float marchsq::GyroidField::get_scalar ( coordf_t x,
coordf_t y,
coordf_t z_arg ) const
inline
75 {
76 return gyroid(fx * float(x), fy * float(y), fz * float(z_arg));
77 }
static float gyroid(float x, float y, float z)
Definition FillGyroid.cpp:25

References fx, fy, fz, and Slic3r::gyroid().

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

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

◆ to_Coord()

Coord marchsq::GyroidField::to_Coord ( const Point & p) const
inline
88{ 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 FillGyroid.cpp:86

References offs, and to_coordr().

Here is the call graph for this function:

◆ to_coord()

coord_t marchsq::GyroidField::to_coord ( const coordr_t & x) const
inline
85{ return x * rsize; }
const coord_t rsize
Definition FillGyroid.cpp:55

References rsize.

Referenced by to_Point().

Here is the caller graph for this function:

◆ to_coordr()

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

References rsize.

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

Here is the caller graph for this function:

◆ to_Point()

Point marchsq::GyroidField::to_Point ( const Coord & p) const
inline
87{ 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 FillGyroid.cpp:85

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

Referenced by marchsq::get_gyroid_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::GyroidField::to_Pointf ( const Coord & p) const
inline
90{ return to_Pointf(to_Point(p)); }
Point to_Point(const Coord &p) const
Definition FillGyroid.cpp:87

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::GyroidField::to_Pointf ( const Point & p) const
inline
89{ 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

◆ fx

float marchsq::GyroidField::fx

Referenced by GyroidField(), and get_scalar().

◆ fy

float marchsq::GyroidField::fy

Referenced by GyroidField(), and get_scalar().

◆ fz

float marchsq::GyroidField::fz

Referenced by GyroidField(), and get_scalar().

◆ gsize

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

◆ gsizef

float marchsq::GyroidField::gsizef = 0.40f
staticconstexpr

◆ isoval

float marchsq::GyroidField::isoval = 0.0f

◆ offs

Point marchsq::GyroidField::offs

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

◆ rsize

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

Referenced by to_coord(), and to_coordr().

◆ rsizef

float marchsq::GyroidField::rsizef = 0.004f
staticconstexpr

◆ size

◆ z

coordf_t marchsq::GyroidField::z

Referenced by GyroidField(), and get_scalar().


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