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

[FEATURE] Extend XKT format with parametric primitives #1513

Open
xeolabs opened this issue May 29, 2024 · 0 comments
Open

[FEATURE] Extend XKT format with parametric primitives #1513

xeolabs opened this issue May 29, 2024 · 0 comments
Labels
feature-suggestion Suggestion for how to extend xeokit

Comments

@xeolabs
Copy link
Member

xeolabs commented May 29, 2024

Currently, the XKT format supports primitives like "triangles, "solid", "surface", "lines", "line-strip" and "points".

We could extend XKT to support parametric primitives, such as "cylinder", "sphere", "curve", "spline", "rotation", "extrusion" etc.

For each of these primitives, we would extend each XKT geometry with an additional set of floats, to contain the parameters for its primitive type.

We currently have a single set of arrays, positions and indices, that each geometry owns a portion of.

We would add an additional array of floats, called parameters, that each geometry may own a portion of, when the geometry is a parametric primitive type.

For example, a "sphere" geometry would own a portion of parameters that would contain three entries that would parameterize a sphere:

[<sphere radius>, <number of longitude segments>, <number of latitude segments>]

Although parameters contains floats, in some cases they would actually be integers, such as for the second two parameters in this example.

The benefit of this addition would be that XKT files can made smaller for some models. Possibly IFC parametric geometries can be encoded straight into XKT without triangularizing them first. Not sure how this works with glTF being the intermediate format between IFC -> glTF -> XKT though, singe glTF does not support parametric geometries.

@xeolabs xeolabs added the feature-suggestion Suggestion for how to extend xeokit label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-suggestion Suggestion for how to extend xeokit
Projects
None yet
Development

No branches or pull requests

1 participant