Sometime Sometimes curves don’t look quite right. In Visualize, curves (e.g. a circular arc) are tessellated, meaning they are drawn using a series of line segments. In HPS, you can use the CurveAttributeControl
API to control curve tessellation at the segment level.
Consider the following code, which inserts markers at the same locations used to define and insert an arc;
...
The scale of the data, the default curve attributes, and the camera settings combine to show an arc rendered as a straight line. If the camera were zoomed out, this level of tessellation might be satisfactory. Assuming it’s not, let’s see what we can do to fix the problem.
...
There are two approaches that could be employed in this example to render the arc as a curve.
Add the following to the code above;
Code Block key.GetCurveAttributeControl().SetViewDependent(true);
to make this arc’s tessellation view dependent (cf. https://docs.techsoft3d.com/hps/latest/
...
...
...
html ). This adjusts the tessellation as you zoom in to render the curve smoothly.
The tessellation for view independent curves is set (based on the curve attribute defaults) once and does not change dynamically with camera adjustments. Consider setting other curve attributes for a view independent result that meets your needs.
Info |
---|
A couple things to note:
|
\uD83D\uDCCB Related articles
...