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

Generalize meshes #817

Merged
merged 10 commits into from
Jun 29, 2018
Merged

Generalize meshes #817

merged 10 commits into from
Jun 29, 2018

Conversation

manthey
Copy link
Contributor

@manthey manthey commented May 15, 2018

Generalize the rectangular grid used in the contour feature to a mesh that could also be composed of enumerated triangular or square elements.

This adds more tests to the contour feature and fixes some jsdocs.

@manthey manthey force-pushed the generalize-mesh branch 5 times, most recently from 7533822 to 6a54944 Compare May 15, 2018 20:30
@manthey
Copy link
Contributor Author

manthey commented May 16, 2018

@aashish24 This now has tests for all of the new code.

@manthey manthey force-pushed the generalize-mesh branch from 663f131 to eef533e Compare May 16, 2018 20:11
Generalize the rectangular grid used in the contour feature to a mesh
that could also be composed of enumerated triangular or square elements.

This adds more tests to the contour feature and fixes some jsdocs.

The mesh mixin is not fully tested yet.
@manthey manthey force-pushed the generalize-mesh branch from eef533e to ed5feea Compare May 17, 2018 13:03
@manthey manthey force-pushed the generalize-mesh branch from ed5feea to 20c91d4 Compare May 17, 2018 16:33
@manthey manthey force-pushed the generalize-mesh branch from 10fedb3 to 46a2afc Compare May 18, 2018 13:07
@manthey manthey force-pushed the generalize-mesh branch from ee1385a to 2926b79 Compare June 4, 2018 13:26
* data point is removed from the resultant mesh.
* @returns {geo.meshFeature.meshInfo} An object with the mesh information.
*/
this.createMesh = function (vertexValueFuncs) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manthey does this needs to be in public API?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't need to be. My reasoning for it to be a public API, is that making so encourages its reuse in other components.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see but from the end-user perspective, I do see rare use specially since this does not seem like a self contained method. I would make it _createMesh but if you have strong feelings about keeping it public, I am fine with that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll change it.

* @property {number|function} [style.opacity=1] The opacity on a scale of 0 to
* 1.
* @property {geo.geoPosition|function} [style.position=data] The position of
* each data element. This defaults to just using `x`, `y`, and `z`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very minor document issue (not sure if that matters when this will get rendered). Seems to have lot many blank spaces between the '.' and 'This'.

Copy link
Contributor Author

@manthey manthey Jun 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two popular choices in typography, two spaces between sentences or one. There are impassioned arguments for each side, and, since it is opinion, there is no strict right or wrong. I use two spaces. HTML is poor in that it collapses all spaces to a single space, losing the semantic difference between sentence separation and word separation, but in the source, this is still apparent. In old typography manuals, it used to be argued that word separation should be 1/5 em and sentence separation should be 1/3 em, but that doesn't work in monospaced fonts.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, I am fine with this as long as we are consistent. We could probably mention this somewhere so that a new developer follows the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to update the docs in general to mentioned all of the desired behavior for jsdocs in general.

Copy link
Member

@aashish24 aashish24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manthey the API looks great. Apart from some minor comments, this looks good to me but I have not run the code.

manthey added 3 commits June 29, 2018 15:40
The function can take optional bounds to override the calculated values,
and can take the smaller spanning range of the specified bounds and the
calculated bounds.
Move calculating the min and max of an array to a utility function.
@manthey manthey merged commit e1b835b into master Jun 29, 2018
@manthey manthey deleted the generalize-mesh branch June 29, 2018 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants