Skip to main content

GeoSolver Doc

Introduction

This is a library for solving three-dimensional geometric constraints. Built on top of Sympy, it enables the definition of Constraint, processing with a Processor, and invocation of a Solver for solution.

Table of Contents

Point

from GeoSolver.Point

A = Point(x=None,y=None,z=None) #Indeterminate Point(None can omit)
A = Point(x=1) #Point with Specified x Value
A = Point(x=1,y=2,z=3) #Fixed Point

A.x #X value
A.fit() #Show coordinate

Vector

from GeoSolver.Point
from GeoSolver.Vec


A = Point(x=1,y=2,z=3) 
B = Point(x=2,y=3,z=4) 

V = Vec(A,B) #Define a vector
V.length() #length
V.coordinate() #(1,1,1)
V.dot(V1) #dot product
V.cross(V1) #cross product

Surface

from GeoSolver.Vec
V1 = ...
V2 = ...
V3 = ...

from GeoSolver.Surface

S = Surface(V1, V2) #Use two vectors to define a surface
S.line_surface_angle(V3) 

S2 = ...
S.surface_surface_angle(S2)

Solve

from point import Point
from constraint import Constraint
from processor import Processor
from solver import Solver


Constraint = Constraint()
solver = Solver(Constraint)

# Add Point and Constraint
Constraint.add_point(0, Point(0, 0, 0))
Constraint.add_point(1, Point(1, 0, 0))
Constraint.add_point(2, Point(z=0))

Constraint.add_line_constraint([0, 1], 1)
Constraint.add_line_constraint([0, 2], 1)
Constraint.add_line_constraint([1, 2], 1)
# Process
Processor(Constraint)


print(solver.solve())

constraints

add_line_constraint(point_ids, length)

add_angle_constraint(point_ids, angle)

add_parallel_constraint(point_ids: list): # point 1,2 parallel with 3,4

add_line_surface_angle_constraint(line_point_ids: list, surface_point_ids: list, target_angle)

add_surface_surface_angle_constraint(surface1_point_ids: list, surface2_point_ids: list, target_angle)

add_area_constraint(point_ids, target_area)

add_symmetric_constraint(point1_id, point2_id, symmetry_line_point_ids: list)

Metadata

Release files for GeoSolver 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for GeoSolver 1.0.3
File Size Uploaded Provenance Actions
GeoSolver-1.0.3.tar.gz 5.1 kB Without provenance Details for GeoSolver-1.0.3.tar.gz

Release files / GeoSolver-1.0.3.tar.gz

Download URL GeoSolver-1.0.3.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
24d059c2f92fd95478602385f436c3d8605de88f3e8529f277927eeb015e01ff
BLAKE2b-256 checksum
How to use checksums
7b35c0ff62802990d60739d75edfe3c1b4f111901a487f0434b6b7f5afda67e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Security for GeoSolver 1.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.3 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page