Skip to main content

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

import Application
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


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.4.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

pythinkdesign-0.1.4-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file pythinkdesign-0.1.4.tar.gz.

File metadata

  • Download URL: pythinkdesign-0.1.4.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for pythinkdesign-0.1.4.tar.gz
Algorithm Hash digest
SHA256 550cb081d7ec3bf849a4bef2fc1358b709d6a6ad4f659eecaf242c009bc05276
MD5 3b02f8c49486bb667f6c9ec3954b54fb
BLAKE2b-256 69727d77f09cc51b95c649374eaacfb7058a8f1b0add556ef634fa0942bdbaa1

See more details on using hashes here.

File details

Details for the file pythinkdesign-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: pythinkdesign-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for pythinkdesign-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 627f59dddb1321ae53ed94b03151b137cf7328fcf7c22fe7859fc09b3ea2294f
MD5 a62f7372f124d8e60c3d5a4ad6624ce4
BLAKE2b-256 2d73941fe47d7f78335e7a9edd972fd4cc339396bf16a8dac56e4224040b5f91

See more details on using hashes here.

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