Skip to content
ForCADDocumentation

periodic_topology Function

public pure function periodic_topology(knot, degree, Xc, Wc, nc, dir) result(periodic)

Verify a cyclic tensor-product spline topology in one parameter direction.

Let be degree, the selected directional control count, , , , and . A representation is periodic only if its ordinary knot-vector invariants hold, the seam multiplicity is at most , and

while every control layer with directional index repeats layer , for . Supplied rational weights must repeat in the same way. These cyclic coefficient and knot identities imply equality of the two seam traces and their derivatives through order , where is the seam-knot multiplicity. They are therefore stronger than parameter wrapping or endpoint coincidence alone.

Xc uses direction-1-fastest tensor flattening. Omit nc and dir for a curve or packed directional control lines. Every coordinate component is compared with a tolerance proportional to its control-net diameter and to the ULPs of the two values. Weights use their global positive scale and their corresponding ULPs. No absolute unit-scale floor is introduced, so uniform scaling of coordinates or weights cannot change the topology classification.

Reference: M. W. Blake et al., NASA Geometry Data Exchange Specification for Computational Fluid Dynamics (NASA IGES), NASA Reference Publication 1338, 1994, Sections 4.7.2 and 4.8.2. NASA publication.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), contiguous :: knot(:)

Complete candidate knot vector.

integer, intent(in) :: degree

Polynomial degree in the selected direction.

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

Curve controls, packed lines, or flattened tensor-product controls.

real(kind=rk), intent(in), optional, contiguous :: Wc(:)

Optional flattened positive rational weights.

integer, intent(in), optional, contiguous :: nc(:)

Optional tensor-product control counts.

integer, intent(in), optional :: dir

Selected tensor direction when nc is present.

Return Value logical