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

Hotfix: earcut-rs utils3d API changes #286

Merged
merged 1 commit into from
Feb 16, 2024
Merged

Conversation

ciscorn
Copy link
Member

@ciscorn ciscorn commented Feb 16, 2024

Summary by CodeRabbit

  • 新機能

    • 3Dから2Dへのプロジェクト機能が改善され、より正確な変換が可能になりました。
  • 変更点

    • 特定の関数呼び出しにおいて、追加の引数が必要となり、機能の精度が向上しました。

@ciscorn ciscorn requested a review from a team February 16, 2024 08:02
@ciscorn ciscorn self-assigned this Feb 16, 2024
@ciscorn ciscorn enabled auto-merge (squash) February 16, 2024 08:04
Copy link

coderabbitai bot commented Feb 16, 2024

Walkthrough

プロジェクト全体で、project3d_to_2d関数の呼び出しにおいて、新しい引数3を追加する変更が行われました。これは、3D座標を2Dに投影する際の処理に影響を与えます。また、earcut_rsモジュールの構造変更に伴い、いくつかのインポート文も更新されています。

Changes

ファイル 変更概要
nusamai-geometry/examples/citygml_polygons.rs
nusamai-gltf/examples/geometry_to_gltf.rs
nusamai/src/sink/.../mod.rs (複数ファイル)
project3d_to_2d関数への引数3の追加。earcut_rsのインポート文の更新。

🐰✨📐🗺️

二つの世界をつなぐ

三次元から二次元へ

新たな引数、道を照らす

コードの織り成す、小さな変革

進化し続ける、我々の地図

🌍➡️🗺️✨🐰


Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 9ce23fc and e329bfa.
Files selected for processing (5)
  • nusamai-geometry/examples/citygml_polygons.rs (2 hunks)
  • nusamai-gltf/examples/geometry_to_gltf.rs (2 hunks)
  • nusamai/src/sink/cesiumtiles/mod.rs (2 hunks)
  • nusamai/src/sink/gltf_poc/mod.rs (2 hunks)
  • nusamai/src/sink/ply/mod.rs (2 hunks)
Additional comments: 7
nusamai/src/sink/ply/mod.rs (1)
  • 139-139: project3d_to_2d 関数の呼び出しに第3引数 3 を追加した変更は、earcut-rs ライブラリのAPI変更に対応するために必要です。この変更は適切に行われています。
nusamai-geometry/examples/citygml_polygons.rs (1)
  • 243-243: project3d_to_2d 関数の呼び出しに第3引数 3 を追加した変更は、earcut-rs ライブラリのAPI変更に対応するために必要です。この変更は適切に行われています。
nusamai/src/sink/cesiumtiles/mod.rs (2)
  • 14-14: project3d_to_2d 関数のインポート文を更新した変更は、モジュール構造の変更を反映しています。この変更は適切に行われています。
  • 270-270: project3d_to_2d 関数の呼び出しに第3引数 3 を追加した変更は、earcut-rs ライブラリのAPI変更に対応するために必要です。この変更は適切に行われています。
nusamai-gltf/examples/geometry_to_gltf.rs (2)
  • 14-14: インポートパスの更新が正しく行われています。earcut_rs::utils3d::project3d_to_2dへの変更は、earcut-rsライブラリのモジュール構造の変更に対応しており、適切な修正です。
  • 255-255: project3d_to_2d関数呼び出しに追加された引数3は、関数の新しいシグネチャに準拠しています。この変更は、APIの更新に対応するために必要であり、適切に実装されています。
nusamai/src/sink/gltf_poc/mod.rs (1)
  • 9-9: earcut_rs::utils3d::project3d_to_2dへのインポートパスが更新されました。新しいモジュール構造に正しく対応していることを確認しました。

@@ -178,7 +178,7 @@ impl DataSink for GltfPocSink {
buf3d.clear();
buf3d.extend(poly.coords());

if project3d_to_2d(&buf3d, num_outer, &mut buf2d) {
if project3d_to_2d(&buf3d, num_outer, 3, &mut buf2d) {
Copy link

Choose a reason for hiding this comment

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

project3d_to_2d関数呼び出しに追加された引数3は、earcut-rsライブラリのAPI変更に対応するためのものです。この変更は、関数の新しいシグネチャに適合していますが、この追加引数の意味や目的についてのコメントがコード内にないため、将来のメンテナンス性が懸念されます。この引数が何を表しているのか、なぜ3が選ばれたのかについての説明をコメントとして追加することをお勧めします。

Copy link

codecov bot commented Feb 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Additional details and impacted files
Components Coverage Δ
GUI ∅ <ø> (∅)
Backend 86.72% <100.00%> (ø)
Libraries 91.28% <ø> (ø)

📢 Thoughts on this report? Let us know!

Copy link
Member

@sorami sorami left a comment

Choose a reason for hiding this comment

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

LGTM!

@ciscorn ciscorn merged commit f3e2bb0 into main Feb 16, 2024
4 checks passed
@ciscorn ciscorn deleted the hotfix-earcut-utils3d branch February 16, 2024 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants