Skip to content

CGAL: Add Minkowski sum offset for round corners #5

Description

@jf---

Summary

Add MINKOWSKI_ROUND offset method to CGAL geometry module for true round corner offsetting.

Current State

The CGAL module currently only supports STRAIGHT_SKELETON offset method, which produces miter-like corners. The OffsetMethod.MINKOWSKI_ROUND enum exists but throws "not yet implemented".

Technical Challenge

CGAL's approximated_offset_2 requires an exact rational kernel (e.g., Exact_predicates_exact_constructions_kernel with Gmpq), but we're using Exact_predicates_inexact_constructions_kernel for performance.

Options:

  1. Use exact kernel for Minkowski operations only (slower but accurate)
  2. Use CGAL::offset_polygon_2 with Polygon_offset_builder
  3. Approximate with disc polygon for Minkowski sum

Reference

Files

  • bindings/src/cgal_geometry.cpp - implementation needed in offset_polygon_minkowski()
  • bindings/src/cgal_geometry.h - OffsetMethod::MINKOWSKI_ROUND already defined

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions