Skip to content
ForCADDocumentation

revolve Interface

public interface revolve

Construct an exact rational revolution of a curve or surface.

Curve input returns a surface and surface input returns a volume. The output adds a quadratic rational direction whose control count and knot multiplicities depend only on the number of at-most-quarter-circle arcs.


Module Procedures

private pure function revolve_curve(curve, axis_point, axis_direction, angle) result(surface)

Revolve a NURBS curve exactly into a rational quadratic-arc surface. The angle is signed and measured in radians. The axis is defined by a three-dimensional point and any finite nonzero direction vector. Every arc spans at most ; its middle-layer weight is multiplied by . The source parameter is direction 1 and the revolution parameter is direction 2.

For an arc of signed angle , endpoint layers use the original section weight , while the tangent-intersection layer uses . This is the exact projective conic construction, not a polynomial approximation. One- and two-coordinate source controls are embedded in three dimensions by appending zeros.

See Piegl and Tiller, The NURBS Book, 2nd ed., Section 8.4.

Arguments

Type IntentOptional Attributes Name
type(nurbs_curve), intent(in) :: curve

Valid source curve with at most three coordinate components.

real(kind=rk), intent(in), contiguous :: axis_point(:)

Point on the axis, shape [3].

real(kind=rk), intent(in), contiguous :: axis_direction(:)

Finite nonzero axis direction, shape [3]; it need not be normalized.

real(kind=rk), intent(in) :: angle

Nonzero signed revolution angle in radians.

Return Value type(nurbs_surface)

private pure function revolve_surface(surface, axis_point, axis_direction, angle) result(volume)

Revolve a NURBS surface exactly into a rational quadratic-arc volume. The angle is signed and measured in radians. The axis is defined by a three-dimensional point and any finite nonzero direction vector. Source directions 1 and 2 are retained; the revolution parameter becomes direction 3. Every rational arc spans at most . One- and two-coordinate source controls are embedded in three dimensions by appending zeros.

See Piegl and Tiller, The NURBS Book, 2nd ed., Section 8.4.

Arguments

Type IntentOptional Attributes Name
type(nurbs_surface), intent(in) :: surface

Valid source surface with at most three coordinate components.

real(kind=rk), intent(in), contiguous :: axis_point(:)

Point on the axis, shape [3].

real(kind=rk), intent(in), contiguous :: axis_direction(:)

Finite nonzero axis direction, shape [3]; it need not be normalized.

real(kind=rk), intent(in) :: angle

Nonzero signed revolution angle in radians.

Return Value type(nurbs_volume)