-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve error message for bad geometry in .obj file.
- Loading branch information
mitiguy
committed
Sep 19, 2024
1 parent
9799cc0
commit 26a5b00
Showing
6 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# File: bad_geometryA.obj | ||
# The geometry in this file produces invalid mass and inertia properties | ||
# due to the winding (order of the vertices) in some of the faces. | ||
# Related files: bad_geometryB.obj and bad_geometry_corrected.obj | ||
# ---------------------------------------------------------------------- | ||
|
||
g test | ||
|
||
# 6 vertices. | ||
v 0.0 0.0 0.5 | ||
v 0.0 0.0 -0.5 | ||
v 0.0 1.0 0.5 | ||
v 0.0 1.0 -0.5 | ||
v 1.0 0.0 0.5 | ||
v 1.0 0.0 -0.5 | ||
|
||
# 8 faces. | ||
f 1 3 5 | ||
f 2 4 6 | ||
f 1 2 3 | ||
f 2 3 4 | ||
f 3 4 5 | ||
f 4 5 6 | ||
f 5 6 1 | ||
f 6 1 2 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# File: bad_geometryB.obj | ||
# The geometry in this file produces invalid mass and inertia properties | ||
# due to the winding (order of the vertices) in some of the faces. | ||
# Related files: bad_geometryA.obj and bad_geometry_corrected.obj | ||
# ----------------------------------------------------------------------- | ||
|
||
g test | ||
|
||
# 6 vertices. | ||
v 0.0 0.0 0.5 | ||
v 0.0 0.0 -0.5 | ||
v 0.0 1.0 0.5 | ||
v 0.0 1.0 -0.5 | ||
v 1.0 0.0 0.5 | ||
v 1.0 0.0 -0.5 | ||
|
||
# 8 faces. | ||
f 1 3 5 | ||
f 6 4 2 | ||
f 1 2 3 | ||
f 4 3 2 | ||
f 3 4 5 | ||
f 6 5 4 | ||
f 5 6 1 | ||
f 2 1 6 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# File: bad_geometry_corrected.obj | ||
# The geometry in this file produces valid mass and inertia properties | ||
# as contrasted with the invalid mass and inertia properties produced | ||
# by the related files bad_geometryA.obj and bad_geometryB.obj. | ||
# ----------------------------------------------------------------------- | ||
|
||
g test | ||
|
||
# 6 vertices. | ||
v 0.0 0.0 0.5 | ||
v 0.0 0.0 -0.5 | ||
v 0.0 1.0 0.5 | ||
v 0.0 1.0 -0.5 | ||
v 1.0 0.0 0.5 | ||
v 1.0 0.0 -0.5 | ||
|
||
# 8 faces. | ||
f 1 5 3 | ||
f 2 4 6 | ||
f 1 3 2 | ||
f 2 3 4 | ||
f 3 5 4 | ||
f 4 5 6 | ||
f 5 1 6 | ||
f 6 1 2 |
This file contains 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
This file contains 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