Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mesh] Refactor MeshTaichi API #6306

Merged
merged 18 commits into from
Oct 13, 2022
Merged

Conversation

g1n0st
Copy link
Contributor

@g1n0st g1n0st commented Oct 12, 2022

Issue: #3608

This PR is targeting for officially releasing MeshTaichi. For simplifying the usage and deprecating out-dated design decisions, we would like to update MeshTaichi front-end APIs:

Current:

import taichi

mesh = ti.TriMesh()
mesh.verts.place({'x' : ti.math.vec3})
mesh.faces.link(mesh.verts)
model = mesh.build("bunny.obj")

Updated:

import taichi
import meshtaichi_patcher as Patcher

mesh = Patcher.load_mesh("bunny.obj", relations=['FV'])
mesh.verts.place({'x' : ti.math.vec3})

Full updates:

  • Remove implicit data type cast warnings
  • Add deprecate warnings for out-dated APIs
  • Support new APIs & add documentations
  • Remove (experimental) automatic relation analysis
  • Add full warnings for undeclared mesh relations
  • Expose get_position_as_numpy() instead of implicit data copy

@g1n0st g1n0st added the mesh MeshTaichi label Oct 12, 2022
@g1n0st g1n0st self-assigned this Oct 12, 2022
@netlify
Copy link

netlify bot commented Oct 12, 2022

Deploy Preview for docsite-preview ready!

Name Link
🔨 Latest commit f071d40
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/63480a94a0d76c000b2f6b52
😎 Deploy Preview https://deploy-preview-6306--docsite-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@g1n0st g1n0st changed the title [mesh] refactor MeshTaichi API [mesh] Refactor MeshTaichi API Oct 12, 2022
Copy link
Collaborator

@BillXu2000 BillXu2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@g1n0st g1n0st merged commit 804f1f3 into taichi-dev:master Oct 13, 2022
g1n0st added a commit that referenced this pull request Oct 19, 2022
continue from: #6306

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
jim19930609 pushed a commit to jim19930609/taichi that referenced this pull request Oct 31, 2022
continue from: taichi-dev#6306

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mesh MeshTaichi
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants