Handbook
Glossary
edge-points ( edges edge-indices face-indices face-points -- edge-pts )
Vocabulary
euler
.
b-rep
.
subdivision
Inputs
edges
an
object
edge-indices
an
object
face-indices
an
object
face-points
an
object
Outputs
edge-pts
an
object
Definition
USING:
accessors
arrays
assocs
kernel
math
math.vectors
sequences
sequences.private
;
IN:
euler.b-rep.subdivision
::
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