-
Notifications
You must be signed in to change notification settings - Fork 65
Issue 1730 mesh with missing vertices #1731
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
698d4fa
Added a test for issue #1730
doutriaux1 5b99fee
Added test to test suite
doutriaux1 949be82
almost there shapes are correctly plotted but still marked as missing
doutriaux1 37140e1
cleaned up print debug
doutriaux1 4a29d78
thx to @sankhesh got the number of ids per cell correctly done
doutriaux1 31d935e
retrigger
doutriaux1 05e0fd0
Fixed style issues
aashish24 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,58 @@ | ||
| import numpy | ||
| import vcs | ||
| import sys | ||
| import os | ||
| pth = os.path.join(os.path.dirname(__file__),"..") | ||
| sys.path.append(pth) | ||
| import checkimage | ||
|
|
||
| x=vcs.init() | ||
|
|
||
| x.setantialiasing(0) | ||
| x.drawlogooff() | ||
| x.setbgoutputdimensions(1200,1090,units="pixels") | ||
|
|
||
| data_values = [ 25, 45, 55.] | ||
|
|
||
| data_lon = [ 5., 10., 15.] | ||
| data_lat = [ 5., 10., 15.] | ||
|
|
||
| data_lon_vert = [ | ||
| # Triangle (last one missing because traingle has only 3 vertices | ||
| [2.5,7.5,5.,1.e20], | ||
| # Square | ||
| [7.5,12.5,12.5,7.5], | ||
| # Diamond | ||
| [15.,17.5,15,12.5], | ||
| ] | ||
|
|
||
| data_lat_vert = [ | ||
| # triangle | ||
| [2.5,2.5,7.5,1.e20], | ||
| # square | ||
| [7.5,7.5,12.5,12.5], | ||
| # diamond | ||
| [12.5,15,17.5,15], | ||
| ] | ||
|
|
||
| mesh = numpy.array([data_lat_vert,data_lon_vert]) | ||
| print "MESH SHAPE:",mesh.shape,mesh.dtype | ||
| mesh = numpy.transpose(mesh,(1,0,2)) | ||
| print "MESH SHAPE:",mesh.shape | ||
| mesh = numpy.ma.masked_greater(mesh,1.e19) | ||
|
|
||
| """ | ||
| print "Triangle lats:" | ||
| print mesh[0][0] | ||
| print "Triangle lons:" | ||
| print mesh[0][1] | ||
| """ | ||
| m = x.createmeshfill() | ||
| m.levels = [20,30,50,70,80] | ||
| m.mesh = True | ||
|
|
||
| x.plot(numpy.array(data_values,),mesh,m,bg=True) | ||
| x.png("test_vcs_meshfill_vertices_issue.png") | ||
| src = sys.argv[1] | ||
| ret = checkimage.check_result_image("test_vcs_meshfill_vertices_issue.png",src,checkimage.defaultThreshold) | ||
| sys.exit(ret) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
nice var name thanks 👍