Skip to content

Repository files navigation

GXML

A Python library for geometric XML layout, panel intersection solving, and geometry generation.

Features

  • XML-based layout definition - Define complex panel layouts using declarative XML
  • Intersection solving - Compute where panel centerlines meet (joints, T-junctions, crossings)
  • Face segmentation - Determine how panel faces are subdivided by intersections
  • Bounds computation - Calculate trim/gap adjustments for precise geometry
  • Geometry generation - Create 3D panel geometry with proper mitering and gaps

Installation

pip install gxml

Quick Start

fromgxmlimportGXMLParserfromgxml.elements.solversimportIntersectionSolver, FaceSolver, BoundsSolver# Parse XML layoutparser=GXMLParser()
root=parser.parse_file("layout.xml")
# Extract panelspanels=root.get_panels()
# Solve geometryintersection_solution=IntersectionSolver.solve(panels)
face_result=FaceSolver.solve(intersection_solution)
bounds_solution=BoundsSolver.solve(face_result)
# Access computed geometryforpanelinpanels:
segments=bounds_solution.get_segments(panel, face_side)
corners=bounds_solution.get_face_corners(panel, face_side)

Pipeline Overview

The geometry pipeline has 4 stages:

  1. IntersectionSolver - Finds where panel centerlines meet
  2. FaceSolver - Determines face segmentation from intersection topology
  3. BoundsSolver - Computes trim/gap adjustments
  4. GeometryBuilder - Creates actual 3D geometry

Documentation

Full documentation available at: https://github.com/yourusername/gxml/docs

Development

# Clone repository
git clone https://github.com/yourusername/gxml.git
cd gxml
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate# Install with dev dependencies
pip install -e ".[dev]"# Run tests
pytest

License

MIT License - see LICENSE file for details

Contributing

Contributions welcome! Please read CONTRIBUTING.md for guidelines.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages