-
Notifications
You must be signed in to change notification settings - Fork 46
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
Add support for point and line primitives #39
Comments
The |
Partial support now in 3.0.0 which includes your PR? |
Actually, not really. What I m thinking now is this:
The last point is for the case where you have an OBJ file that contains degenerate faces which are meant to represent points or lines. I dunno if this is actually common enough in the wild to warrant adding more code to allow these to be represented as such. In general, we probably want to better model what is in an OBJ using maybe an enum? enum Entity {
Points(Mesh)
Lines(Mesh)
Mesh(Mesh)
Curves(tbd)
Surface(tbd)
} P.S. Regarding |
The degenerate faces thing I haven't run into, but I also pretty much just use triangulated meshes exported from Blender. I think your proposed changes and the enum sound good. Then in the case of degenerate faces when not specifying to treat them as other elements we'd return an error back to the user. A NURBS crate would be cool to have in Rust! From the tobj side we can add support for importing them as well but leave the actual NURBS interpretation to another standalone crate. |
Hmm, I understand the reasoning. But we have functionality to filter them out already. I.e. I would expect them to get filtered out when enum DegenerateFaceHandling {
Keep,
FilterOut,
/// Convert to points or lines (once we support them)
Convert,
/// Inflate to triangles.
Inflate,
} |
I do not have time to write one. I just started working on an OpenNURBS wrapper until I realized there is actually no code for polygonal meshing meshing in the lib. |
Oh yeah, not one from scratch in Rust that's a ton of work, a wrapper over something that's working well in C or C++ is good |
The code already handles
Line
s but just stashes them as normal faces (as triangles even, iftriangulate_faces
is on).Points need to be added and then two more indices.
The text was updated successfully, but these errors were encountered: