/
Control Curve Tessellation using Curve Attributes
Control Curve Tessellation using Curve Attributes
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;
auto key = GetCanvas().GetFrontView().GetAttachedModel().GetSegmentKey();
Point pt1(407530, 445592, 0);
Point pt2(407669, 445636, 0);
Point pt3(407803, 445694, 0);
key.InsertCircularArc(pt1, pt2, pt3);
key.InsertMarker(pt1);
key.InsertMarker(pt2);
key.InsertMarker(pt3);
The result is rendered as shown;
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. For more information on fixing this issue, check out our forum post.
Related articles
, multiple selections available,
Related content
How-to: Add Cutting Plane Manipulators and Create Slice in HPS
How-to: Add Cutting Plane Manipulators and Create Slice in HPS
Read with this
How-To: Render different line pattern when line is obstructed and un-obstructed in HPS
How-To: Render different line pattern when line is obstructed and un-obstructed in HPS
More like this
FAQ: HPS Anti-Aliasing
FAQ: HPS Anti-Aliasing
Read with this
How-to: Display CAD model in multiple views
How-to: Display CAD model in multiple views
Read with this
How-To: Adjust scene light brightness
How-To: Adjust scene light brightness
Read with this
How-To: Insert Text with with non-english characters
How-To: Insert Text with with non-english characters
Read with this