Skip to main content

Python bindings for FreeCAD's PlaneGCS 2D geometric constraint solver

Project description

planegcs

Python bindings for FreeCAD's PlaneGCS 2D geometric constraint solver.

Installation

pip install planegcs

Quick Start

from planegcs import Sketch, SolveStatus

s = Sketch()

# Create three points for a triangle
p1 = s.add_point(0, 0)
p2 = s.add_point(5, 0)
p3 = s.add_point(2.5, 4)

# Create lines
l1 = s.add_line(p1, p2)
l2 = s.add_line(p2, p3)
l3 = s.add_line(p3, p1)

# Make it equilateral
s.equal_length(l1, l2)
s.equal_length(l2, l3)

# Fix first point and make base horizontal
s.fix_point(p1, 0, 0)
s.horizontal(l1)

# Fix the side length to 5
d = s.add_param(5.0)
s.p2p_distance(p1, p2, d)

# Solve
status = s.solve()
assert status == SolveStatus.Success

# Read results
print(s.get_point(p1))  # (0.0, 0.0)
print(s.get_point(p2))  # (5.0, 0.0)
print(s.get_point(p3))  # (~2.5, ~4.33)

License

LGPL-2.1-or-later (same as the FreeCAD source code it wraps).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

planegcs-0.1.1.tar.gz (87.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

planegcs-0.1.1-cp313-cp313-win_amd64.whl (312.8 kB view details)

Uploaded CPython 3.13Windows x86-64

planegcs-0.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (380.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

planegcs-0.1.1-cp312-cp312-win_amd64.whl (312.7 kB view details)

Uploaded CPython 3.12Windows x86-64

planegcs-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (380.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

File details

Details for the file planegcs-0.1.1.tar.gz.

File metadata

  • Download URL: planegcs-0.1.1.tar.gz
  • Upload date:
  • Size: 87.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for planegcs-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7eaaa8acbf218c50e1edd702f75603a9b473174fa2e9afa08dc6b67e5ed0804a
MD5 d2df263cdda3e17eb5827fd3749b7fb0
BLAKE2b-256 3e967dc5586e041d1b59f04751c03358ea0952055e62b22429582634b2fedbd1

See more details on using hashes here.

Provenance

The following attestation bundles were made for planegcs-0.1.1.tar.gz:

Publisher: release.yml on spookylukey/planegcs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file planegcs-0.1.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: planegcs-0.1.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 312.8 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for planegcs-0.1.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 fc0646119994974009a2798c5cd89785ece79a7c98c69b8548adc71e29cd5e58
MD5 d2cce3263946bc38f5f310007bb460b8
BLAKE2b-256 0c664eba55d99fc6d14e857bea7d8a5437bacd01acd180bdf48924072f6169df

See more details on using hashes here.

Provenance

The following attestation bundles were made for planegcs-0.1.1-cp313-cp313-win_amd64.whl:

Publisher: release.yml on spookylukey/planegcs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file planegcs-0.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for planegcs-0.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 00e9f408e138cedcdfb24e149eef3e2971d00d021c78a396722f86318fa6e74c
MD5 2c72982fb400768e1124605e95c6bc1d
BLAKE2b-256 e27de1c0178113d27cde8d38f47fef3661e88b985f06be28eb8239660600af8e

See more details on using hashes here.

Provenance

The following attestation bundles were made for planegcs-0.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on spookylukey/planegcs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file planegcs-0.1.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: planegcs-0.1.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 312.7 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for planegcs-0.1.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 fe1ebe4f10c571580b92a3d2acf1d460e4bee9fd00d66ff7a16c209ae0074c12
MD5 f2656a25e14b1414f5baafc20e5abbc1
BLAKE2b-256 49d644c29ec1bbb7d22a34e5fde233e007198eff9d7af12db902b40c9481a5e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for planegcs-0.1.1-cp312-cp312-win_amd64.whl:

Publisher: release.yml on spookylukey/planegcs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file planegcs-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for planegcs-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 76c5bb73ee4a313725eca7a39073ac1d74ffca341663da1485a9b9109f1913df
MD5 cc20cc8f3e81a1dfa0d53a41ac6dbbfe
BLAKE2b-256 1ba1d690e50614827b9c1818d58760ebf88e9b57ffc55849997efd732ddee32e

See more details on using hashes here.

Provenance

The following attestation bundles were made for planegcs-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on spookylukey/planegcs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page