edge-points ( edges edge-indices face-indices face-points -- edge-pts )


Vocabulary
euler.b-rep.subdivision

Inputs
edgesan object
edge-indicesan object
face-indicesan object
face-pointsan object


Outputs
edge-ptsan object


Definition


:: edge-points
( edges edge-indices face-indices face-points -- edge-pts )
edges length 0 <array> :> edge-pts edges [| edge n |
edge opposite-edge>> :> opposite-edge opposite-edge
edge-indices at :> opposite-n n opposite-n < [
edge vertex>> position>> opposite-edge vertex>>
position>> v+ edge face>> face-indices at
face-points nth position>> v+
opposite-edge face>> face-indices at face-points nth
position>> v+ 0.25 v*n <vertex>
[ n edge-pts set-nth-unsafe ]
[ opposite-n edge-pts set-nth-unsafe ] bi
] when
] each-index edge-pts ; inline