Skip to content

Observation about pinwheels and quad edge directionality #80

Answered by micycle1
micycle1 asked this question in Q&A
Discussion options

You must be logged in to vote

A workaround was to process edge duals (not just base edges), so the missing pinwheel is picked up as an A vertex.

final HashSet<Vertex> seenHubs = new HashSet<>();

edgeDuals.keySet().forEach(edge -> {
	if (hasConstraints && !edge.isConstrainedRegionInterior()) {
		return;
	}

	if (seenHubs.add(edge.getA())) {
		PShape face = dualFace(edge);
		if (face != null) {
			mesh.addChild(face);
		}
	}
	if (seenHubs.add(edge.getB())) {
		PShape face = dualFace(edge.getDual());
		if (face != null) {
			mesh.addChild(face);
		}
	}
});


Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@micycle1
Comment options

Comment options

You must be logged in to vote
2 replies
@gwlucastrig
Comment options

@micycle1
Comment options

Answer selected by micycle1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants