-
Notifications
You must be signed in to change notification settings - Fork 91
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
X3D/VRML Importer/Exporter Improvements #581
Conversation
* Normals implemented in importer. * creaseAngle implemented in importer when there are no normals. * Added X3D JSON in import/export NOTE: X3D/VRML Improvements, X3D JSON support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might already know this but if not, wings throws away the normals eventually,
it only uses the normals to determine if the object inside out or not and to calculate
hard edges.
So you normally don't have to do the extra effort to include them, if you have the hard edges.
|
||
rv_coordpairs_from_shapes(SL) -> | ||
CoordPairs = lists:append([rv_coordpairs_from_shapes_1(S) || S <- SL]), | ||
sets:from_list(CoordPairs). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This old sets is really slow, I don't know how large these sets are, but in wings we have used gb_sets instead,
nowadays: sets:from_list([List], [{version, 2}]) is faster uses erlang:maps instead.
Maybe add you should add:
wings_u:sets_new() and a wings_u:sets_from_list(List), that adds the [{version,2}] clutch, and use them instead.
or maybe wings_util, take a look which fits best.
It's true I wasn't sure if the normals were used for anything a while back until I found out it was used when the hard edge list is empty. I'll add wings_u:sets_from_list(List) and update the pull request soon. Thanks for letting me know about the new option. |
Double check if you should use wings_u or wings_util I didn't check, was too lazy :-) |
I forgot to leave a comment after making the fix. I've chosen wings_util to make the change since it looks like where the data structure and non-GUI stuff goes. Let me know if there's anything I should change. |
Nah it is me who have been busy with work and vacation, and sadly a lack of interest of coding wings. Kind of to old to spend my nights hacking wings. I'll try to take a look soon. |
Made some improvements to x3d_import and wpc_wrl:
NOTE: X3D/VRML Improvements, X3D JSON support.