|
Action:
|
Modifies the shape of the deformable model to fit to its constraints. This function should be used after sculpting.
|
|
|
Prototype:
|
void DM_refine_dmod_fit (
|
|
|
int& rtn_err,
|
|
// out: 0=success
|
|
|
|
|
|
// or negative err
|
|
|
|
|
|
// code
|
|
|
DS_dmod* dmod,
|
|
// in: member of
|
|
|
|
|
|
// hierarchy to
|
|
|
|
|
|
// modify
|
|
|
double err_size,
|
|
// in: max ok crv_err
|
|
|
|
|
|
// without
|
|
|
|
|
|
// postprocessing
|
|
|
double& residual,
|
|
// out: abs max elem
|
|
|
|
|
|
// value in r = Cx-d
|
|
|
double& beg_crv_dist_err,
|
// out: max
|
|
|
|
|
|
// edge/crv_cstrn
|
|
|
|
|
|
// dist before refine
|
|
|
double& end_crv_dist_err,
|
// out: max
|
|
|
|
|
|
// edge/crv_cstrn
|
|
|
|
|
|
// dist after refine
|
|
|
double& max_dist_moved,
|
|
// out: max distance
|
|
|
|
|
|
// one dof moved
|
|
|
int walk_flag
|
|
// in: specify how
|
|
|
|
= 0,
|
|
// deep to go
|
|
|
|
|
|
// 0=dmod only,
|
|
|
|
|
|
// 1=dmod and
|
|
|
|
|
|
// offspring
|
|
|
|
|
|
// 3=dmod,siblings
|
|
|
|
|
|
// and offspring
|
|
|
SDM_options* sdmo
|
|
// in:SDM_options
|
|
|
|
= NULL
|
|
// pointer
|
|
|
|
|
|
// eff: Moves the
|
|
|
|
|
|
// dofs by a minimal
|
|
|
|
|
|
// amount to minimize
|
|
|
|
|
|
// the residual of
|
|
|
|
|
|
// the constraint
|
|
|
|
|
|
// equations,
|
|
|
|
|
|
// r = Cx - d
|
|
|
);
|
|
|
Includes:
|
#include "kernel/acis.hxx"
|
|
#include "dshusk/dskernel/dmapi.hxx"
|
|
#include "dshusk/dskernel/dsdmod.hxx"
|
|
#include "dshusk/dskernel/sdm_options.hxx"
|
|
|
Description:
|
Modifies the target deformable model's control point locations (dofs).
|
|
|
This function is used to minimize the numerical tolerances seen when enforcing the deformable modeling constraints on a deformable model.
|
|
|
It is intended to be used as a single post-processing step after sculpting is completed but before the deformed shape is used in a geometric modeling application.
|
|
|
This function tweaks the deformable model's shape slightly to improve the tolerances held by the curve constraints. Typically this function moves dof values slightly (1.E-05) to improve the constraint tolerances from about 1.E-05 to 3.E-07. This function is expensive to run and should only be run to restore the curve constraint tolerances after a sculpting session. This function should only be run once per sculpting session.
|
|
|
Before refining, this function stores in
beg_crv_dist_err the maximum distance between an edge and the surface's curve points as found by
DS_crv_->Compare_src_to_out_W_pts(). When
beg_crv_dist_err is less than
err_size processing aborts and a value of 0 is returned. Otherwise, the refinement processing is executed by calling the
DS_symeq->Refine_Cx_equal_d() function to improve compliance with the constraints and computes and stores in
end_crv_dist_err the refined distance error. The output residual is set with the maximum residual error in the constraint equations, res = Cx - d .
|
|
|
Increased compliance to the curve constraint equations is achieved by moving the
dofs
the minimum amount of distance to put the
dof
state back into the range of the constraint matrix. In other words, this function moves the control points to improve compliance with the constraints.
|
|
|
When the input dmod deformable model is one root sibling of a multi-surface sibling list, its link constraints are treated like curve constraints and the refinement is run only on the input dmod. To refine an entire sibling list, call this function once on each root sibling.
|
|
|
Errors:
|
DM_NULL_INPUT_PTR
|
|
The deformable model cannot be NULL on entry.
|
|
|
Library:
|
dshusk
|
|
|
Filename:
|
ds/dshusk/dskernel/dmapi.hxx
|
|
|
Effect:
|
Changes model
|