Skip to content
This repository was archived by the owner on Nov 22, 2023. It is now read-only.

Conversation

@dreammaker
Copy link

I was getting a BoundsError without this.

@SimonDanisch
Copy link
Member

I think this would best be:

v1,v2,v3 = mesh.vertices[face]

@dreammaker
Copy link
Author

I don't understand what you mean. mesh.vertices is a Vector so the code you wrote won't function. ...unless there's already code that allows getindex() of a face that I don't know about.

@SimonDanisch
Copy link
Member

Yeah that's exactly the case ;) It takes care of the offset and such.
We really need some documentation!

@dreammaker
Copy link
Author

@SimonDanisch, I updated this pull request.

@sjkelly
Copy link
Member

sjkelly commented Dec 2, 2015

Sweet. I didn't know about the getindex trick.

sjkelly added a commit that referenced this pull request Dec 2, 2015
Fix slice to use the correct offset
@sjkelly sjkelly merged commit 286536d into JuliaGeometry:master Dec 2, 2015
@dreammaker dreammaker deleted the jt/fix-slice-offset branch December 2, 2015 14:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants