Skip to content

TrevorDArcyEvans/NeoGeoSolver.NET

 
 

Repository files navigation

NeoGeoSolver

screenshot-ui

This project provdes a geometric constraint solver for CAD systems as a set of reusable C# components.

Prerequisites

  • .NET 7

Optional

  • Docker

Getting started

# clone repo
$ git clone https://github.com/TrevorDArcyEvans/NeoGeoSolver.NET.git

# build
$ cd NeoGeoSolver.NET
$ dotnet restore
$ dotnet build

# run tests
$ dotnet test

# run UI
$ cd NeoGeoSolver.NET.UI.Web
$ dotnet run

open NeoGeoSolver.NET

Docker

$ docker build -t neo-geo-solver .
$ docker run -p 5051:80 neo-geo-solver

open NeoGeoSolver.NET

Supported constraints

  • arc circle concentric
  • arcs concentric
  • arc radius
  • arcs equal radius
  • arc circle equal radius
  • points coincident
  • points distance
  • points horizontal
  • points vertical
  • point on arc
  • point on circle
  • point to line distance
  • point to point vertical distance
  • point to point horizontal distance
  • point to line vertical distance
  • point to line horizontal distance
  • point on midpoint of a line
  • point on midpoint of an arc
  • point on a quadrant point of a circle
    • +x (parameter = 0)
    • +y (parameter = 1)
    • -x (parameter = 2)
    • -y (parameter = 3)
  • circles concentric
  • circle diameter
  • circles equal diameter
  • lines collinear
  • line length
  • lines equal length
  • line tangent to arc
  • line tangent to circle
  • angle (between two lines)
  • line horizontal
  • line vertical
  • lines parallel
  • lines perpendicular
  • equal value (might be useful?)

Unsupported constraints

all done for the moment

Further work

  • change arc definition to centre-radius-start_angle-end_angle
  • implement unsupported constraints
  • remove unused constraints
    • tangent (use line-entity distance with zero distance)
    • point on (use point-entity distance with zero distance)
    • points angle
  • remove unused entities
    • function (no docs + not normally used in CAD)
    • spline (no docs + not normally used in CAD)
    • ellipse + ellipsearc (not normally used in CAD)
  • more unit tests for solver
    • multiple constraints
  • portable UI aka test harness
  • support Docker
  • document solver internals

Further information

Acknowledgements

This repository was forked from BimCAD which in turn was forked from NoteCAD; which I suspect was based on geosolver-python

About

C# Geometric Constraint Solver for CAD systems

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • C# 93.4%
  • HTML 4.9%
  • CSS 1.2%
  • Dockerfile 0.5%