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

System.ArgumentException:“'0' cannot be greater than -1.” #60

Open
6ther opened this issue Feb 27, 2024 · 11 comments
Open

System.ArgumentException:“'0' cannot be greater than -1.” #60

6ther opened this issue Feb 27, 2024 · 11 comments

Comments

@6ther
Copy link

6ther commented Feb 27, 2024

my code like this:
var indexs = new List<int>(){ 7, 0, 1, 2, 3, 4, 6, 7, 1, 2, 4, 5, 5, 6, 1, 1, 2, 5}; var verts = new List<float>(){17307.352, -13128.241, 4000, 17307.352, 5071.7583, 4000, -8892.649, 5071.7583, 4000, -8892.649, -8428.24, 4000, -4592.6494, -8428.24, 4000, -4592.6494, -928.24164, 4000, 8307.351, -928.24164, 4000, 8307.351, -13128.241, 4000, 17307.352, -13128.241, 4000 }; SimpleInputGeomProvider geomProvider = new(verts, indexs); RcVec3f bmin = geomProvider.GetMeshBoundsMin(); RcVec3f bmax = geomProvider.GetMeshBoundsMax(); RcContext m_ctx = new(); RcConfig cfg = new( RcPartition.WATERSHED, m_cellSize, m_cellHeight, m_agentMaxSlope, m_agentHeight, m_agentRadius, m_agentMaxClimb, m_regionMinSize, m_regionMergeSize, m_edgeMaxLen, m_edgeMaxError, m_vertsPerPoly, m_detailSampleDist, m_detailSampleMaxError, true, true, true, new RcAreaModification(0x2, 0x07), true); RcBuilderConfig bcfg = new(cfg, bmin, bmax); RcBuilder rcBuilder = new(); RcBuilderResult rcResult = rcBuilder.Build(geomProvider, bcfg);
it throws System.ArgumentException:“'0' cannot be greater than -1.”
I don't know how it caused it?

@6ther
Copy link
Author

6ther commented Feb 28, 2024

planeXunlu.txt
1709085981350(1)
I clone the codes, and use my file to test.
it also throws System.ArgumentException:“'0' cannot be greater than -1.”

@ikpil
Copy link
Owner

ikpil commented Feb 28, 2024

image

@ikpil
Copy link
Owner

ikpil commented Feb 28, 2024

image

@ikpil
Copy link
Owner

ikpil commented Feb 28, 2024

Because the 3D model is incorrect. It seems like the coordinate system was misaligned when exporting to obj.

@6ther

@6ther
Copy link
Author

6ther commented Feb 29, 2024

Because the 3D model is incorrect. It seems like the coordinate system was misaligned when exporting to obj.因为3D模型不正确。导出到obj时,坐标系似乎未对齐。

@6ther

I modify the coordinates system of the 3D model, and retry.
It throws System.IndexOutOfRangeException : Index was outside the bounds of the array.
planeXunlu.txt

@6ther
Copy link
Author

6ther commented Feb 29, 2024

xunlu2.txt
I use this file to test.
It also throws System.IndexOutOfRangeException : Index was outside the bounds of the array.
In a word, I do not know what is wrong with my coordinates.

@6ther
Copy link
Author

6ther commented Mar 1, 2024

1709285056763
I use a right hand coord system, the Z-axis is up.
Like in the picture, it is a platform. I want to generate NavMesh on the upper surface, but it does not work and throws System.IndexOutOfRangeException : Index was outside the bounds of the array.
I have no idea.

@ikpil
Copy link
Owner

ikpil commented Mar 5, 2024

Too Big!
image

@ikpil
Copy link
Owner

ikpil commented Mar 5, 2024

image

@ikpil
Copy link
Owner

ikpil commented Mar 5, 2024

It's true that it's too big, but I'll try to reduce memory usage related to RcSpan.

@6ther
Copy link
Author

6ther commented Mar 6, 2024

It's true that it's too big, but I'll try to reduce memory usage related to RcSpan.它确实太大了,但我将尝试减少与RcSpan相关的内存使用。

Thank you for taking the time out of your busy schedule to answer my questions.

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

No branches or pull requests

2 participants