#include <opennurbs_plus_squish.h>
◆ ON_SquishParameters()
ON_SquishParameters::ON_SquishParameters |
( |
| ) |
|
◆ Dump()
void ON_SquishParameters::Dump |
( |
ON_TextLog & |
text_log | ) |
const |
◆ DumpRelativeTolerances()
void ON_SquishParameters::DumpRelativeTolerances |
( |
ON_TextLog & |
text_log | ) |
const |
◆ DumpSpringConstants()
void ON_SquishParameters::DumpSpringConstants |
( |
ON_TextLog & |
text_log | ) |
const |
◆ GetSpringConstants()
bool ON_SquishParameters::GetSpringConstants |
( |
double * |
boundary_bias, |
|
|
double * |
deformation_bias |
|
) |
| const |
Description: See if the spring constants could have been set with SetSpringConstants(). Parameters: boundary_bias - [out] deformation_bias - [out] Returns: If the spring constants have values that could be set by calling SetSpringConstants(), then boundary_bias and deformation_bias are set to those values and this function returns true. Otherwise, boundary_bias and deformation_bias are set to 0.0 and false is returned.
◆ Read()
◆ SetDeformation()
void ON_SquishParameters::SetDeformation |
( |
ON_SquishDeformation |
deformation, |
|
|
bool |
bPreserveBoundary, |
|
|
double |
boundary_stretch_c = 0.0 , |
|
|
double |
boundary_comopress = 0.0 , |
|
|
double |
interior_stretch_c = 0.0 , |
|
|
double |
interior_compress_c = 0.0 |
|
) |
| |
◆ SetSpringConstants()
void ON_SquishParameters::SetSpringConstants |
( |
double |
boundary_bias, |
|
|
double |
deformation_bias |
|
) |
| |
Description: A simplified interface for setting the m_*_stretch_c and m_*_compress_c constants. Parameters: boundary_bias - [in] 0.0 to 1.0 0.0: boundary and interior treated the same 1.0: strongest bias to preserving boundary lengths at the expense of interior distortion. deformation_bias - [in] -1.0 to 1.0 -1.0: strongest bias in favor of compression. 0.0: no preference between compression and stretching 1.0: strongest bias in favor of stretching
◆ Write()
bool ON_SquishParameters::Write |
( |
class ON_BinaryArchive & |
binary_archive | ) |
const |
◆ DefaultValue
◆ m_absolute_limit
double ON_SquishParameters::m_absolute_limit |
If -1.0 <= m_absolute_limit < 0.0, then then an absolute compression limit is applied so that (2d length)/(3d length) >= fabs(m_absolute_limit). In particular, if m_absolute_limit = -1.0, then no compression is permitted (2d length) >= (3d length).
If 0.0 < m_absolute_limit <= 1.0 then then an absolute stretching limit is applied so that (2d length)/(3d length) <= 1/fabs(m_absolute_limit).
Examples: m_absolute_limit 1.0: no stretching, (2d length) <= 1.0*(3d length) 0.5: cap on stretching, 0.5*(2d length) <= (3d length) -0.5: cap on compression, (2d length) >= 0.5*(3d length) -1.0: no compression, (2d length) >= 1.0*(3d length)
◆ m_bAreaPreprocess
bool ON_SquishParameters::m_bAreaPreprocess |
Set to true if the initial guess has at least 20% of the triangles in the wrong orientation.
◆ m_bGaussianBias
bool ON_SquishParameters::m_bGaussianBias |
Set to bias deformation to happen in regions with relatively more Gaussian curvature. The mesh's m_K[] values must be set for this setting to have an effect.
◆ m_bLengthPostprocess
bool ON_SquishParameters::m_bLengthPostprocess |
Set to true to tune up the result.
◆ m_bNewtonPreprocess
bool ON_SquishParameters::m_bNewtonPreprocess |
Default is false. Set to true to debug problem cases.
These settings determine how the solution is calculated Leave them as is unless you are debugging.
◆ m_bOptimize
bool ON_SquishParameters::m_bOptimize |
Enables the critical optimization step. Default is true. Setting it to false is used for debugging the results of the setup and preprocessing steps.
◆ m_boundary_compress_c
double ON_SquishParameters::m_boundary_compress_c |
◆ m_boundary_compress_rel_tol
double ON_SquishParameters::m_boundary_compress_rel_tol |
◆ m_boundary_stretch_c
double ON_SquishParameters::m_boundary_stretch_c |
spring constant for compressed boundary edges is m_boundary_compress_c/(rest length)
◆ m_boundary_stretch_rel_tol
double ON_SquishParameters::m_boundary_stretch_rel_tol |
unused
***** these are unused ***** If a m_..._stretch_rel_tol parameter is > 1.0, then the mesh will be automatically split in areas where the relative stretch exceeds the specified relative tolerance. If a m_..._compress_rel_tol parameter is > 0.0 and < 1.0, then the mesh will be automatically split in areas where the relative compression exceeds the specified relative tolerance.
◆ m_bPreserveTopology
bool ON_SquishParameters::m_bPreserveTopology |
If the mesh has coincident vertices and m_bPreserveTopology is true, then the flattening is based on the mesh's topology and coincident vertices will remain coincident. Otherwise coincident vertices are free to move apart.
◆ m_bSaveMapping
bool ON_SquishParameters::m_bSaveMapping |
If m_bEnableMapBack is true, then ON_SquishMesh() will save extra information on the squished mesh so 3d points and curves near the input mesh can be mapped to the squished mesh and 2d points and curves on the squished mesh can be mapped back to the 3d mesh.
◆ m_diagonal_compress_c
double ON_SquishParameters::m_diagonal_compress_c |
◆ m_diagonal_compress_rel_tol
double ON_SquishParameters::m_diagonal_compress_rel_tol |
◆ m_diagonal_stretch_c
double ON_SquishParameters::m_diagonal_stretch_c |
◆ m_diagonal_stretch_rel_tol
double ON_SquishParameters::m_diagonal_stretch_rel_tol |
◆ m_interior_compress_c
double ON_SquishParameters::m_interior_compress_c |
◆ m_interior_compress_rel_tol
double ON_SquishParameters::m_interior_compress_rel_tol |
◆ m_interior_stretch_c
double ON_SquishParameters::m_interior_stretch_c |
◆ m_interior_stretch_rel_tol
double ON_SquishParameters::m_interior_stretch_rel_tol |
◆ m_material
unsigned int ON_SquishParameters::m_material |
0 = geometric flattening algorithm (scale independent)the "spring" constant is proportional to 1/L^2 and the result is independent of scale. 1 = physical stress flattening algorithm (scale dependent) the "spring" constant is proportional to 1/L.