settriangulationparams problem
settriangulationparams problem
hi,
i am trying to set the normaltolerance of the triangulationparams.
i have browsed the odamfcapp, which does this using a command window.
however, debugging does not reveal the actual method of setting this parameter. by tracing the assembler code the command
odmodelergeometryimpl::settriangulationsparameters
seems to be used (source code is missing).
could you provide me a code snippet to run settriangulationsparameters
and gettriangulationsparameters directly without using the command interface, in codamfcappdoc:

noptionstriangulationparams
best regards,
dag barosen
set\get triangulation params realized via command only. you could use next form of executecommand to set normaltolerance to 10.
executecommand("modelerproperties normaltolerance 10 finish");
c++ api to acis tessellation parameters?
hello alex
the last time i checked up on this issue i was told that access to the "include\wr\wrtriangulationparams.h" acis tessellation parameters would be given a c++ interface in a near future version of dwgdirect. looking at the code i'm not sure if this has come about. my desire is to modify the acis tessellation parameters used when converting a acis embedded dwg model over to dxf. could you provide an example snippet of code to show the current method to set all /supported/ acis tessellation parameters? i recall in 2004 or 2005 you had mentioned to me that not all of them are currently used. thanks.
code:
#include "wr\\wrtriangulationparams.h"
#include "modelergeometry\\modelermodule.h"
toolkit_export odrxclassptr odrxgetmodelergeometrycreatorservice();
void codamfcappdoc:

noptionstriangulationparams()
{
odrxclassptr pservice = odrxservicedictionary()->getat(dd_t("odmodelergeometrycreator"));
if (pservice.isnull())
{
odrxmoduleptr pmodule = odrxdynamiclinker()->loadapp(dd_t("modelergeometry"));
odsmartptr<modelermodule> pmodmodule = modelermodule::cast(pmodule);
if (pmodmodule.get())
{
wrtriangulationparams triangulationparams;
pmodmodule->gettriangulationparams(triangulationparams);
triangulationparams.normaltolerance = 1;
pmodmodule->settriangulationparams(triangulationparams);
}
}
wrtriangulationparams params;
params.normaltolerance = 1.0;
modelermodule::settriangulationparams(params);
hi alex
thanks for the very prompt reply. i just need to confirm one other thing. a while ago you provided me this info. can you confirm that these are still the list of supported and non-supported tessellation paramerters? i'd think that "surfacetolerance" would be your core surface deviation control method -- how is that controlled by most end users other than the normal deviation and nurbs grid lines?
---------
double maxfacetedgelength;
by default = 0. i.e. disabled.
double normaltolerance;
by default = 15. i.e. sphere, cone, torus, cylinder breaks with angle step <= 15.
oduint32 pointsperedge;
for situation like circle hole at plane. circle approximate by pointsperedge point polyline. ' 0.' is default, getsamplepoints with ' 0. ' approxeps used in this case.
oduint16 betweenknots;
for nurbs tesselation only. if betweenknots = 0, nurbs grid lines lies on the knots value in uv plane. if betweenknots = 1, additional line added between knot values....
aren't supported :
oduint32 maxnumgridlines;
double surfacetolerance;
double gridaspectratio;
maxfacetedgelength
hello alex
for the "maxfacetedgelength" parameter, what does it define and what are its limits?
in spatial acis this parameter ranges from 0.0 to 1.0.
while experimenting with dwgdirect, any value greater than 0 and less than 1.0 would cause no data (of a acis solid sphere) to be imported. setting it to 1.0 forced the length of the longest edge of a triangle to be no greater than 1.0 worldspace units. setting it greater than 1.0 had no further effect over the 1.0 value. hence, i am slightly confused about its usage and parameter limits.
and to mirror my other question elsewhere, are the other "unused" parameters now used anywhere in the current dwgdirect implementation, and if so, what are their (1) definitions, (2) what do they affect and (3) what are their upper/lower parameter bounds?
thanks.
hi,
only few parameters are used - these are
normaltolerance - controll tesselation of cylinders\spheres\cones
betweenknots - for nurb surfaces
pointsperedge - used in rare cases when edge cannot be represented properly.
busefacetres - use facetres system variable. it just tried to recalculate dnormaltol = f (facetres) to 'something like autocad'.
all other parameters are unused.