Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

3D Modeling Toolkit

A toolkit integrating multiple 3D modeling libraries to support rapid use of 3d models

Examples

Part 1: The use of pywavefront

First, determine an object file path:

    from tk3d.api.pywavfront import *
    object_filename="data/objects/Bulldozer.obj"

Example 1: get object keys from an object file

    list_object_keys=get_object_keys(object_filename)
    print("List of object keys: ",list_object_keys)

Example 2: show 3d object in window

    show_object(object_filename,object_key="Object.1",xyz=(0,1,-2))

Example 3: show object in pyglet.window

 show_object_window(obj_filename=object_filename,
                       list_obj_key=["Object.1","Object.2"],
                       list_position=[(0, 0, -1.5),(0, 0, -1.5)],
                       scale=0.01,
                       bgcolor=(0.5,0.5,0.5)
                       )

Example 4: show 3d object in rotation view

    show_object_window_gl(obj_filename=object_filename)

Part 2: The use of vispy

import tk3d.api.vispyapi as vis
vis.show_object(model_file="data/objects/Chess set.obj")

Part 3: Show human body 3d model

from tk3d.api.human import *
object_filepath="data/objects/standard-male-figure.obj"
show_object_human(object_file=object_filepath)

Part 4: The use of open3d

from tk3d.api.open3dapi import *
ply_filepath="data/ply/tet.ply"
# Example 1
show_ply(ply_filename=ply_filepath)
# Example 2
ply_filepath="data/ply/Hand.ply"
show_pointcloud(ply_filename=ply_filepath)
# Example 3
ply_filepath="data/ply/Hand.ply"
paint_points_knn(ply_filename=ply_filepath,uniform_color=[0.5,0.4,0.5],point_id=1500,point_num=200,target_color=[0.5,0,0.5])
# Example 4
ply_filepath="data/ply/Hand.ply"
paint_points_radius(ply_filename=ply_filepath,uniform_color=[0.5,0.4,0.5],point_id=1500,radius=10,target_color=[0,1,0])
# Example 5
ply_filepath="data/ply/Hand.ply"
paint_point(ply_filename=ply_filepath,point_id=1500,target_color=[0,1,0])
# Example 6
ply_filepath="data/ply/Hand.ply"
paint_points(ply_filename=ply_filepath,list_point_id=[1,2,3,4,5],list_target_color=[[0,1,0],[0,1,0],[0,1,0],[0,1,0],[0,1,0]])

Credits

License

The tk3d toolkit is provided by Donghua Chen with MIT License.

Metadata

Release files for tk3d 0.0.1a1

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

Source distribution (sdist)

Source distribution for tk3d 0.0.1a1
File Size Uploaded Provenance Actions
tk3d-0.0.1a1.tar.gz 15.7 kB Without provenance Details for tk3d-0.0.1a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tk3d 0.0.1a1
File Interpreter ABI Platform Actions
tk3d-0.0.1a1-py3-none-any.whl Python 3 none any Details for tk3d-0.0.1a1-py3-none-any.whl

Total release size: 30.3 kB

Release files / tk3d-0.0.1a1.tar.gz

Download URL tk3d-0.0.1a1.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
687d425da164ef88062c4a20435733980ea2d791c2061c8cfbe262c71be6b364
BLAKE2b-256 checksum
How to use checksums
814ecb870580706b6f856f1a2be4faf9aea652fdd5fcdaabcb022ed9a19f8998
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

Release files / tk3d-0.0.1a1-py3-none-any.whl

Download URL tk3d-0.0.1a1-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d3301034f75add4d2f37e67361a30ff25c0fc222fb6ea6a06f53300159bf467
BLAKE2b-256 checksum
How to use checksums
558b072fa009553b561680cf84d512ab07a9c20c13da0c9e0a584343caac678a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

Security for tk3d 0.0.1a1

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.

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