DM_build_square_zone
List of: Functions
Subjects: DML Patches, Deformable Modeling
Contents: Standalone Deformable Modeling

Action: Builds and returns a DS_zone object suitable for use as an area constraint.

Prototype: DS_zone* DM_build_square_zone (


int& rtn_err, // out: 0=success or neg




// err code


DS_dmod* dmod, // in: target dmod




// for new zone


int domain_flag, // in: specify coordinate




// system for min and max




// pts.




// 0=orig_dmod_space,




// 1=unit_space,




// 2=




// internal_pfunc_space.


double min[2], // in : square's




// lower-left pt


double max[2], // in : square's




// upper-right pt




// mallocs: returned




// zone object


SDM_options* sdmo // in:SDM_options pointer



= NULL //


);

Includes: #include "kernel/acis.hxx"

#include "dshusk/dskernel/dmapi.hxx"

#include "dshusk/dskernel/dsdmod.hxx"

#include "dshusk/dskernel/dszone.hxx"

#include "dshusk/dskernel/sdm_options.hxx"

Description: Builds and returns a DS_zone object suitable for use as input to the DM_add_area_cstrn() call. A DS_zone object specifies a sub-region within the deformable model's DS_pfunc object.


The input arguments min and max specify diagonally opposite corners of a rectangular subdomain of the DS_pfunc. This subdomain specifies the DS_zone sub-region, via the underlying DS_pfunc surface.


The inputs min and max are domain points which can be given in one of three different coordinate systems. The input domain flag value specifies which coordinate system is being used for these points.


When domain_flag = 0, the domain points are given in the original_dmod_space, (the domain range of the DS_pfunc object at the time it was used to build the DS_dmod object and before it may have been scaled internally.)


When domain_flag = 1, the domain points are given in the unit space, a square region that ranges from 0.0 to 1.0.


When domain_flag = 2, the domain points are given in the internal_pfunc_space, (the domain range currently stored in the deformable model's DS_pfunc object. This range often varies from the original_dmod_space due to internal scalings of the DS_pfunc's domain.)


The internal representation of shape stored within the returned zone is saved in the internal_pfunc_space coordinate system.


mallocs the returned zone object is malloced and must be freed by the application at the appropriate time. However, once the zone is used to make an area constraint or some other kind of tag object, the DM library will free this memory when asked to free the tag object.

Errors: DM_parse_tag_flag()

errors



DM_NULL_INPUT_PTR

When dmod is not NULL on input.



DM_BAD_DOMAIN_FLAG_VALUE

When the domain_flag value is not one of, 0=orig_dmod_space, 1=unit-space, 2=internal_pfunc_space.

Library: dshusk

Filename: ds/dshusk/dskernel/dmapi.hxx

Effect: Changes model
PDF/DS/03FNA.PDF
HTM/DATA/DS/DS/03FNA/0020.HTM