Since you guys solved my last two questions in a couple of heartbeats I'm hoping you can help me with this slightly less well-defined issue!
I'm trying to produce a tessellation of the contents of a Creo model to export via a plugin, and I'm finding the documentation quite lacking in describing the input parameters for tessellation. I'm referring here to the parameters which are accessible with the ProSurfacetessellationinput*Set functions.
As far as I have been able to work out, the Chord Height and Step Size parameters represent physical distance, Chord Height being the distance by which the tessellation is allowed to deviate from the surface and Step Size being the maximum length of an edge in the tessellation.
Angle is quite puzzling to me. I assume it's linked to the maximum angle allowed in the tessellation before further subdivision. One would think, then, that it took an angle in either degrees or radians as input. Oddly enough, this does not appear to be the case.
First of all it seems like values above 1.0 causes the tessellation to ignore the two other factors. Furthermore, the number of triangles produces is very low and seems to remain fixed for all values above 1.0.
For values between 0.0 and 1.0 the angle seems to have no effect whatsoever. With both chord height and step size high in relation to model size, setting angle to, say, 0.0001 has the same result as setting it to 0.9999. Namely, something low in triangles seemingly only depending on the chord height and step size.
So essentially I can ignore angle completely, setting it to 1.0, for instance, and control the tessellation exclusively via Chord Height and Step Size. I would, however, like complete control over tessellation - not just the distance parameters.
Does anyone here have any experience in dealing with the TOOLKIT's tessellation function? What's the deal with that angle?
Hello,
I know it has been a while that you wrote this topic, but I am trying to get the tessellation of a model, using ProSurfaceTessellationGet(), and setting the step size using an object ProSurfaceTesselllationInput. However, it doesn't matter the value I use, the mesh generated is too coarse. It seems that nodes are created only in the vertices, generating a mesh too large.
Did you find out how to control mesh size using ProSurfaceTessellationGet?
Thanks,
Tiago
I never did work out how the tessellation input behaved, so I gave up and ended up just using ChordHeight exclusively. Setting it relative to the model size gave decent results. Roughly:
// double quality; I just display a single "quality" parameter to the user, between 0-1
double partSize = calcPartSize(part); // diagonal of the model in model units - from ProSolidOutlineGet double smallestFeature = partSize * 0.01; // very arbitrary double minChord = 0.00001 * smallestFeature; double maxChord = 0.05 * smallestFeature; double chordSpan = maxChord-minChord;
// map the linear quality to a logarithmic scale to avoid big jumps in triangle counts at the high end double remappedQuality = remap(quality); double chord = maxChord - ((chordSpan)*invTess); ProSurfacetessellationinputChordheightSet(surfaceTessellationInput, chord);
This at least behaves somewhat predictably for the user, but the resulting triangulation is a bit naive.
Thanks for your help.
I also set an arbitrary value for chord height and it works for me now.