3D Modeling Toolkit
Project description
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.
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
tk3d-0.0.1a1.tar.gz
(15.7 kB
view details)
Built Distribution
tk3d-0.0.1a1-py3-none-any.whl
(14.6 kB
view details)
File details
Details for the file tk3d-0.0.1a1.tar.gz
.
File metadata
- Download URL: tk3d-0.0.1a1.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 687d425da164ef88062c4a20435733980ea2d791c2061c8cfbe262c71be6b364 |
|
MD5 | b7b96e700b9abef721d15669df4ccc94 |
|
BLAKE2b-256 | 814ecb870580706b6f856f1a2be4faf9aea652fdd5fcdaabcb022ed9a19f8998 |
File details
Details for the file tk3d-0.0.1a1-py3-none-any.whl
.
File metadata
- Download URL: tk3d-0.0.1a1-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d3301034f75add4d2f37e67361a30ff25c0fc222fb6ea6a06f53300159bf467 |
|
MD5 | e550f0573574251b8b8f64655603b78a |
|
BLAKE2b-256 | 558b072fa009553b561680cf84d512ab07a9c20c13da0c9e0a584343caac678a |