python sdk for thinkdesign
Project description
PyThinkDesign
python sdk for thinkdesign
install
pip install PyThinkDesign
usage
1. Get or Create TD application
if the TD application is not running, it will be created.
from PyThinkDesign import Application
app = Application.GetOrCreateApplication()
2. Create lines and arcs in a document
from PyThinkDesign import Application
from PyThinkDesign import Geo3d
# get application and document
app = Application.GetOrCreateApplication()
doc = app.ActiveDocument
# get creators
curveCreator = doc.CurveCreator
#add lines
p1 = Geo3d.Point(0,0,0)
p2 = Geo3d.Point(1,0,0)
p3 = Geo3d.Point(1,1,0)
p4 = Geo3d.Point(0,1,0)
curveCreator.AddLine(p1,p2)
curveCreator.AddLine(p2,p3)
curveCreator.AddLine(p3,p4)
curveCreator.AddLine(p4,p1)
#add arc
pCenter = Geo3d.Point(10,0,0)
pXDir = Geo3d.Vector(1,0,0)
pYDir = Geo3d.Vector(0,1,0)
radius = 10
startAng = 0
endAng = 60
curveCreator.AddArc(pCenter, pXDir, pYDir, radius, startAng, endAng)
#doc.SaveAs("d:\\tdApp.e3")
app.Quit()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pythinkdesign-0.1.6.tar.gz
(105.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pythinkdesign-0.1.6-py3-none-any.whl
(105.2 kB
view details)
File details
Details for the file pythinkdesign-0.1.6.tar.gz.
File metadata
- Download URL: pythinkdesign-0.1.6.tar.gz
- Upload date:
- Size: 105.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
435a7e6a88b66e9287450bc22bbcaf1dce3f42068f8aa1f3dfffaee195624e69
|
|
| MD5 |
59317a50f1255ba3970a29f01dc6ddcd
|
|
| BLAKE2b-256 |
c9c485995a032db5a0f3ad37eac4946ced504d4263f934052ef953026cae8dfe
|
File details
Details for the file pythinkdesign-0.1.6-py3-none-any.whl.
File metadata
- Download URL: pythinkdesign-0.1.6-py3-none-any.whl
- Upload date:
- Size: 105.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67aae086a78430486ea21feea40285f7f8921b0de2ac69b42293de00c3c4a4f3
|
|
| MD5 |
737594b27316329abfc9b4008eda0b10
|
|
| BLAKE2b-256 |
5a4c77ff17c77ecd5e7fcf2cc51213b4429fa6df5545b89c57d8e4b7a09547ed
|