Connectivity
The connectivity of a set of surface patches can be identified following the patch conventions
and the Bezier mesh conventions
.
Patch Interfaces
To identify common edges and common corner points beween patches of a surface, the identifyInterfaces
function is provided
using NURBS
Patches = readMultipatch("assets/sphere.dat")
interfaces, commonVtxs = identifyInterfaces(Patches, tol=1e-3)
To determine whether two patches share a common edge, in the current implementation only the corner points are compared. The maximim allowed distance between two points to be identified as one can be specified by tol
.
The returns are vectors of Interface
structures, which are a winged edge like structure:
struct PatchInterface{I}
patchID::I
localEdge::I
end
struct Interface{I}
patch1::PatchInterface{I}
patch2::PatchInterface{I}
orientation::I # edges normal to interface have same orientation
reverse::Bool # adjacent edges have same orientation
end
To get patch-wise information the getPatchInterfaces
function is provided
ifPatchwise = NURBS.getPatchInterfaces(Patches, interfaces, commonVtxs)
Bezier Mesh
To extract information about the adjacency of a virtual Bezier mesh, the
bezierAdj = NURBS.bezierAdjacency(interfaces, commonVtxs, 3, 3, length(Patches))
To determine all connectivity information, the Connectivity
function can be used, which returns a struct containing the interface vector, the patchwise vectors and the Bezier adjacency:
using NURBS
Patches = readMultipatch("assets/sphere.dat")
cty = Connectivity(Patches, 3, 3, tol=1e-3)
cty.interfaces
cty.patchInterfaces
cty.bezierAdjacency