bs3_curve_cylinder
List of: Functions
Subjects: Construction Geometry, Spline Interface
Contents: Kernel

Action: Gets a cylinder enclosing a bs3_curve.

Prototype: void bs3_curve_cylinder (


bs3_curve cu, // given curve


SPAposition& root, // returned cylinder root




// point


SPAunit_vector& axis, // returned cylinder axis


double& rad // returned cylinder radius


);

Includes: #include "kernel/acis.hxx"

#include "baseutil/vector/position.hxx"

#include "baseutil/vector/unitvec.hxx"

#include "kernel/spline/bs3_crv/bs3curve.hxx"

#include "kernel/spline/d3_bs3/spd3rtn.hxx"

Description: The cylinder axis is parallel to the line between its end points, and its radius is the minimum required to enclose all the B-spline control points.


The method is:


First, set the axis to the line from P1 to Pn (these being the first and last vertexes in the B-spline hull).


Second, find the vertex furthest from this line. Move the axis parallel to itself, halfway to this vertex.


Third, find the vertex furthest from the new axis. Use the distance to this vertex as the cylinder radius.

Library: kernel

Filename: kern/kernel/spline/d3_bs3/spd3rtn.hxx

Effect: Changes model
PDF/KERN/18FN3C1.PDF
HTM/DATA/KERN/KERN/18FN3C1/0019.HTM