Skip to content

Commit

Permalink
[half-edge] addEdge return two HalfEdges -- that are symmetrical
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyuheng committed Sep 17, 2023
1 parent a5b574f commit 442c365
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
8 changes: 7 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# half-edge

[half-edge] `addEdge` return two `HalfEdge`s -- that are symmetrical
[half-edge] `Mod` has `nodeCounters` -- remove `globalNodeCounters`

[half-edge] `Mod` has `halfEdgeCounter`

[half-edge] `createHalfEdgeId`

[half-edge] `addEdge` -- generate `id` and add `HalfEdge`s to `net.halfEdgeEntries`

[half-edge] `PortEntry` -- `connection` through `HalfEdge`

Expand Down
12 changes: 12 additions & 0 deletions src/lang/net/addEdge.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { HalfEdge } from "../half-edge"
import { Mod } from "../mod"
import { Net } from "../net"

export function addEdge(
net: Net,
mod: Mod,
): { first: HalfEdge; second: HalfEdge } {
const first = { id: "" }
const second = { id: "" }
return { first, second }
}

0 comments on commit 442c365

Please sign in to comment.