tycho_nurbs_mesh

    Tycho NURBS Mesh — optional adapter converting tycho_nurbs tessellation to tycho_geometry MeshData (ports & adapters)

    nurbs
    mesh
    tessellation
    adapter
    tycho
    Download zip
    Version
    0.1.0
    License
    Apache-2.0
    Last updated
    yesterday
    Downloads
    11

    #Tycho NURBS Mesh (laplaceliu/tycho_nurbs_mesh)

    Optional mesh adapter for tycho_nurbs — the ports & adapters boundary of the unconstrained design (D1).

    The NURBS core is math-only and outputs a neutral, Double-precision Tessellation. This adapter is the only place that knows about tycho_geometry::MeshData; it down-casts DVec3 -> Vec3 / DVec2 -> Vec2 at the boundary (the same "high-precision construction, down-cast for GPU upload" pattern as tycho_math/f64).

    • Render consumers (tycho_3d) depend on this adapter.
    • Pure CAD / analysis / CNC / SVG consumers depend only on the math-only core.

    Used by examples/nurbs/cad (headless validation) and examples/nurbs/surfaces (rendered NURBS gallery through tycho_3d).

    #API

    to_mesh_data(t : @nurbs.Tessellation) -> @tgeo.MeshData
    surface_to_mesh(srf : @nurbs.NurbsSurface3, segs_u, segs_v) -> @tgeo.MeshData?

    #Dependencies

    tycho_nurbs + tycho_geometry + tycho_math. Zero third-party, zero C, all targets (native / wasm / js).

    #License

    Apache-2.0.

    surface_to_mesh

    Tessellate a NURBS surface and convert straight to MeshData. None if the tessellation fails (invalid segment counts or evaluation failure).

    to_mesh_data

    Convert a neutral NURBS tessellation to a Float MeshData (positions/normals down-cast DVec3 -> Vec3, uvs DVec2 -> Vec2; indices already UInt).

    Source Files