Luce packages
LuceLuce BaseLuciaOS

dymokomi/luce-geocore

Shared geometry for Luce: polygon meshes, attributes, modeling kernels and CPU spatial queries, with no GPU or UI dependency.

A library written in luce-base. Latest release 0.7.9.

Install#

luc add dymokomi/luce-geocore

Documentation#

Luce Geocore

Shared geometry for Luce, with no GPU or UI dependency: polygon meshes, their attributes, groups and selections (Houdini's group syntax), modeling verbs (point, face and topology operators such as extrude, bevel, loop cut, clip, mirror and spin, run through one verb framework), subdivision, primitives, and CPU spatial queries (a lazy triangle BVH). Importers, CAD tessellation and editors produce and share these meshes; the renderer in luce-3d draws them.

A result is immutable once published. Operators return new meshes and share everything they did not change, so a snapshot or a worker-to-UI hand-off costs no copies. Besides meshes, a geometry set holds points, instances, curves (poly, Bezier, NURBS, Catmull-Rom), sparse volumes and SDFs, and saves as a .prism file. See the API, [curves, volumes, SDFs, set verbs and files](docs/FAMILIES.md), mesh modeling and validation.

def dependency "luce-geocore" {
    str owner = "dymokomi"
    str version = "^0.7.1"
}

The Code node runs per-element Luce Base snippets over a set (Houdini's Attribute Wrangle, and with Run Over Voxels the Volume Wrangle) through luce-kernel: Code.check, Code.complete and Code.hover for the editor and Code.run for the cook; the API a snippet sees is in src/code/stubs.lucb (with the gsplat helpers for splat clouds in src/code/gsplat.lucb), and tests/code times whole cooks with --bench.

The Script node's API is luce_geocore.script (Houdini's Python SOP, in Base): a script's cook(k: Cook*) builds and edits a Geometry (points, polygons, attributes, groups, curves, the point cloud, instances) and runs any verb by name (Verb); luced-3d builds it into a tool whose main calls serve, run in a child process the editor drives with luce_geocore.script_host (ScriptProcess, and ScriptText for the node's parameter rows). tests/script checks the API and the protocol end to end.

Import geocore (`from luce_geocore.geocore import Mesh, MeshBuilder, Vector3). Base code in other packages also has luce_geocore.kernel` (bit sets and groups, mesh assembly and its size limits, the geometry set's component protocol, the codec registry, curves and fields), luce_geocore.core.shared (shared columns) and luce_geocore.core.growing (Growing, a heap array that keeps its capacity). A mesh's arrays as spans (point_span(), corner_span(), …) and their packing into GPU layouts (pack_positions, …) are methods of Mesh that only Base sees: Luce leaves out the methods whose signatures it cannot take.

Check out the compilers and packages beside this repository, at main (`python3 ../luce-base/tools/checkout_main.py . ../luce), and run luc test`: the module tests and the Base mesh checks (tests/mesh), each with allocation failure injected at every stage.

Licensed under MIT or Apache-2.0, at your option.

Dependencies#

Versions#

0.7.9

Browse source · pack · commit 2c0c66cb9331

SHA-256 34d13f2bd5f04cedf4ede7c2863dc093ae4aaf093bdd104b6138992cd2c0d114

luce-geocore 0.7.9: batch release

0.7.8

Browse source · pack · commit 9b8eb24b8929

SHA-256 ed8e1ba658268e91fa1dfeb72253a113338ea7b08bdd12b9cf734cee4505569d

luce-geocore 0.7.8: batch release

0.7.7

Browse source · pack · commit 70a0084c0b41

SHA-256 3a37a1f29d4e183724d9698db7b1a933272f1c568b4f812c5adf232461a1eb0c

luce-geocore 0.7.7: batch release

0.7.6

Browse source · pack · commit 5895852eff0f

SHA-256 c8ae401436b0236230c0828fb79274d47760b0ec873ecdf6263586bffed9a20f

luce-geocore 0.7.6: batch release

0.7.5

Browse source · pack · commit 0c4889f3778a

SHA-256 aacbce127013fb0c6a77f934d0a42af7522a6f3c1e5b8d59f4881a47baff80f3

luce-geocore 0.7.5: batch release

0.7.4

Browse source · pack · commit 3585faf603b2

SHA-256 20e3c97ede1419b9963d343dccf2882d2593fe417434ee7d7255e7229b265839

luce-geocore 0.7.4: batch release

0.7.3

Browse source · pack · commit e470fa99b254

SHA-256 0cbc2df0b7493528c0b9c3b59dc7436b698ddc4dfb649f017f00668115371c68

luce-geocore 0.7.3: batch release

0.7.2

Browse source · pack · commit ff4cd6536837

SHA-256 617ce79ad524cfdb9d757609275f1e9f9717cabbc31f2d7ec3087b8c805e72ac

luce-geocore 0.7.2: batch release

0.7.1

Browse source · pack · commit 657d32b28134

SHA-256 419eb8cb18f8a75479ab828eae503bf624957a0d88e7ba90f4917f092116f9b0

dependencies name no version