avila-tesselation

Crates.ioavila-tesselation
lib.rsavila-tesselation
version0.1.0
created_at2025-12-04 22:43:53.82266+00
updated_at2025-12-04 22:43:53.82266+00
descriptionIFC geometry tesselation - converts parametric solids to triangle meshes - 100% Rust
homepage
repositoryhttps://github.com/avilaops/arxis
max_upload_size
id1967254
size19,285
Nícolas Ávila (avilaops)

documentation

README

avila-tesselation

IFC Geometry Tesselation - 100% Rust

Converts IFC parametric solids to triangle meshes.

Features

  • ExtrudedAreaSolid: Profile extrusion with caps and sides
  • BRep: Boundary representation with face triangulation
  • Primitives: Box, Cylinder, Sphere tesselation
  • Configurable: Adjustable tolerance and segment counts

Example

use avila_tesselation::{Tesselator, IfcGeometry, Profile, ProfileType};
use avila_vec3d::Vec3;

// Create tesselator
let tesselator = Tesselator::new(0.01); // 1cm tolerance

// Define rectangular profile
let profile = Profile {
    profile_type: ProfileType::Rectangle { width: 2.0, height: 1.0 },
    position: Vec3::ZERO,
};

// Extrude to 3D solid
let geometry = IfcGeometry::ExtrudedAreaSolid {
    profile,
    extrusion_direction: Vec3::Z,
    extrusion_depth: 3.0,
};

// Tesselate to mesh
let mesh = tesselator.tesselate(&geometry)?;
println!("Triangles: {}", mesh.indices.len() / 3);

Supported IFC Types

  • IfcExtrudedAreaSolid
  • IfcBoundingBox
  • IfcCylinder
  • IfcSphere
  • IfcFacetedBrep
  • IfcTriangulatedFaceSet

License

MIT OR Apache-2.0

Commit count: 0

cargo fmt