Skip to main content

Crate surfer2

Crate surfer2 

Source
Expand description

Headless straight-skeleton engine: Rust port of cgalab/surfer2 (revision c42f9a7f969cd661d060481cd3b8bac2bdfb8dfa).

License: GPL-3.0-or-later. See LICENSE and COPYRIGHT.

This crate translates Surfer2’s kinetic triangulation / wavefront propagation semantics. GUI, CLI, GraphML/OBJ serializers, Boost, and CGAL are out of scope.

Re-exports§

pub use dcel::ArcGeometry;
pub use dcel::Face;
pub use dcel::FaceId;
pub use dcel::HalfEdge;
pub use dcel::HalfEdgeId;
pub use dcel::Node;
pub use dcel::NodeId;
pub use dcel::Skeleton;
pub use dcel::SkeletonSegment;
pub use error::InputError;
pub use error::PropagationError;
pub use error::SkeletonError;
pub use error::TriangulationError;
pub use geometry::Point2;
pub use geometry::Ray2;
pub use geometry::Segment2;
pub use input::InputEdge;
pub use input::Polygon;
pub use input::Pslg;

Modules§

dcel
Safe skeleton DCEL built from authoritative arc records.
error
Structured errors for the public API.
event
Event queue and collapse keys. Integration tests use event::CollapseType. Event queue, collapse specifications, and indexed heap.
geometry
Concrete 2D geometry types shared across the crate.
input
Input models: general PSLG and polygon-with-holes façade.
triangulation
CDT + kinetic triangulation. Integration tests use triangulation::build_basic_triangulation. Static CDT and kinetic triangulation.

Structs§

OffsetPolyline
Options
Propagation options. Additive GraphML edge-weight-additive is not a field: upstream parses that attribute and never applies it. Only multiplicative InputEdge::weight (edge-weight) affects speed.
Propagator
Incremental propagator with step/finish.
Stats

Enums§

ComponentMode
Which planar component(s) to propagate.

Functions§

interior_straight_skeleton
Interior straight skeleton of a polygon with holes.
offset
Compute offset polylines at roof height / wavefront time time.
straight_skeleton
One-shot straight skeleton of a PSLG.