Manifold 3.0
Robust geometry
 
Loading...
Searching...
No Matches
Quality Class Reference

These static properties control how circular shapes are quantized by default on construction. More...

#include <common.h>

Static Public Member Functions

static void SetMinCircularAngle (double angle)
 
static void SetMinCircularEdgeLength (double length)
 
static void SetCircularSegments (int number)
 
static int GetCircularSegments (double radius)
 
static void ResetToDefaults ()
 

Detailed Description

These static properties control how circular shapes are quantized by default on construction.

If circularSegments is specified, it takes precedence. If it is zero, then instead the minimum is used of the segments calculated based on edge length and angle, rounded up to the nearest multiple of four. To get numbers not divisible by four, circularSegments must be specified.

Member Function Documentation

◆ SetMinCircularAngle()

static void SetMinCircularAngle ( double angle)
inlinestatic

Sets an angle constraint the default number of circular segments for the CrossSection::Circle(), Manifold::Cylinder(), Manifold::Sphere(), and Manifold::Revolve() constructors. The number of segments will be rounded up to the nearest factor of four.

Parameters
angleThe minimum angle in degrees between consecutive segments. The angle will increase if the the segments hit the minimum edge length. Default is 10 degrees.

◆ SetMinCircularEdgeLength()

static void SetMinCircularEdgeLength ( double length)
inlinestatic

Sets a length constraint the default number of circular segments for the CrossSection::Circle(), Manifold::Cylinder(), Manifold::Sphere(), and Manifold::Revolve() constructors. The number of segments will be rounded up to the nearest factor of four.

Parameters
lengthThe minimum length of segments. The length will increase if the the segments hit the minimum angle. Default is 1.0.

◆ SetCircularSegments()

static void SetCircularSegments ( int number)
inlinestatic

Sets the default number of circular segments for the CrossSection::Circle(), Manifold::Cylinder(), Manifold::Sphere(), and Manifold::Revolve() constructors. Overrides the edge length and angle constraints and sets the number of segments to exactly this value.

Parameters
numberNumber of circular segments. Default is 0, meaning no constraint is applied.

◆ GetCircularSegments()

static int GetCircularSegments ( double radius)
inlinestatic

Determine the result of the SetMinCircularAngle(), SetMinCircularEdgeLength(), and SetCircularSegments() defaults.

Parameters
radiusFor a given radius of circle, determine how many default segments there will be.

◆ ResetToDefaults()

static void ResetToDefaults ( )
inlinestatic

Resets the circular construction parameters to their defaults if SetMinCircularAngle, SetMinCircularEdgeLength, or SetCircularSegments have been called.