BRL-CAD
Loading...
Searching...
No Matches
Collaboration diagram for Right Parabolic Cylinder:

Files

file  rpc.h
 

Data Structures

struct  rt_rpc_internal
 

Macros

#define RT_RPC_CK_MAGIC(_p)   BU_CKMAG(_p, RT_RPC_INTERNAL_MAGIC, "rt_rpc_internal")
 

Functions

int rt_mk_parabola (struct rt_pnt_node *pts, fastf_t r, fastf_t b, fastf_t dtol, fastf_t ntol, fastf_t min_abs)
 
DEPRECATED int rt_mk_parabola_old (struct rt_pnt_node *pts, fastf_t r, fastf_t b, fastf_t dtol, fastf_t ntol)
 

Detailed Description

Macro Definition Documentation

◆ RT_RPC_CK_MAGIC

#define RT_RPC_CK_MAGIC (   _p)    BU_CKMAG(_p, RT_RPC_INTERNAL_MAGIC, "rt_rpc_internal")

Definition at line 477 of file geom.h.

Function Documentation

◆ rt_mk_parabola()

int rt_mk_parabola ( struct rt_pnt_node pts,
fastf_t  r,
fastf_t  b,
fastf_t  dtol,
fastf_t  ntol,
fastf_t  min_abs 
)
extern

Approximate a parabola with line segments.

Parameters
ptsLinked list of points; must have at least two nodes on entry.
rRectangular half-width of the parabola.
bBreadth (half-height) of the parabola.
dtolMaximum allowable chord-to-curve distance (mm).
ntolMaximum allowable normal-deviation angle (radians); pass M_PI to ignore normal tolerance.
min_absMinimum absolute span (mm) below which subdivision stops, preventing runaway recursion from extremely tight tolerances.

Recommended min_abs values:

  • 0.05 is a conservative default suitable for most CAD geometry. A full circle at this dtol requires ~300 segments; finer values rarely produce visible improvement on typical display hardware.
  • 0.005 produces noticeably smoother curves on very small features but can multiply polygon counts by 10x or more.
  • Values below dtol have no additional effect until dtol itself pushes subdivision to segments shorter than min_abs.
  • SMALL_FASTF (~1e-37) disables the floor entirely, matching the deprecated rt_mk_parabola_old() behavior; use only when the geometry is known to be free of degenerate cases that could trigger unbounded recursion.
Returns
Number of additional points inserted into pts.

◆ rt_mk_parabola_old()

DEPRECATED int rt_mk_parabola_old ( struct rt_pnt_node pts,
fastf_t  r,
fastf_t  b,
fastf_t  dtol,
fastf_t  ntol 
)
extern
Deprecated:
use rt_mk_parabola() with an explicit min_abs argument. Preserves the original behavior of trusting the caller's tolerances unconditionally (equivalent to min_abs = SMALL_FASTF).