oriented polyline#425
Open
cscorley wants to merge 1 commit into
Open
Conversation
a0a863e to
b906e3b
Compare
sebcrozet
requested changes
Jun 18, 2026
sebcrozet
left a comment
Member
There was a problem hiding this comment.
Thank you for this PR!
Another modification that is needed is the behavior of the implementation of PointQuery for Polyline so it mirrors the trimesh behavior. If a Polyline is oriented, then a point starting inside of it should be considered to be its own projection.
See for example the case of an oriented TriMesh:
parry/src/query/point/point_composite_shape.rs
Lines 288 to 311 in ef63da4
Comment on lines
+296
to
+299
| /// Pseudo-normals are a 2D-only feature; in 3D this is a no-op. 3D stub so | ||
| /// `set_flags`/`scaled`/`reverse` compile; mirrors `TriMesh`'s dim2 stub. | ||
| #[cfg(feature = "dim3")] | ||
| fn compute_pseudo_normals(&mut self) {} |
Comment on lines
+126
to
+129
| /// Per-vertex outward pseudo-normals, present when [`PolylineFlags::ORIENTED`] is set; contact | ||
| /// normals are then clamped to one side so the polyline acts as a one-sided surface. | ||
| pseudo_normals: Option<Vec<Vector>>, | ||
| flags: PolylineFlags, |
Member
There was a problem hiding this comment.
Since pseudo-normals (and the PolylineFlags as well) are only relevant in 2d, they should be excluded from 3d using #[cfg(feature = "dim2")].
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #254
adds 2D version of TriMeshFlags::ORIENTED + TriMeshFlags::FixInternalEdges