We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm using Geomerative to get thr points of a font outline, but when I use a font with concentric circles, the circle start/end point is off the line making for a weird distortion. I've played with settings and the setPolygonizerAngle to no avail. It's hard to figure out what all the parameters do but so far I've not been able to fix this. Does anyone have similar experience and/or a solution to this issue? Here's the ttf font on-screen:
Here's the points rendered:
Code is as follows (edited out of other aspects of the program):
if (lines[q] != null) { // q is just the line number indicating which of 3 lines of text we're working on
pushMatrix();
translate(0, q * 72); //spaces lines apart - adjustable
RShape shp = RG.getText(lines[q], combo1.selectedText() + ".ttf", int(tagFontSize[q]*fontScale), CENTER); // font value from drop-down list
RG.setPolygonizer(RG.ADAPTATIVE);
RG.setPolygonizerAngle (PI/4); // Changing this value (0- PI/2) has no effect
shp = RG.polygonize(shp);
shp.scale(0.4);
RPoint[][] pointPaths = shp.getHandlesInPaths();
//Cycle through points & draw them
for(int i = 0; i<pointPaths.length; i++){
if (pointPaths[i] != null) {
println("WE HAVE POINTS L1 "+q);
idx=idx+1;
beginShape();
for(int j = 0; j<pointPaths[i].length; j++){
vertex(pointPaths[i][j].x, pointPaths[i][j].y);
//Dots only to show locations of nodes
stroke(255,0,0);
ellipse(pointPaths[i][j].x, pointPaths[i][j].y, 2, 2);
stroke(0,0,0);
}
endShape();
}
}
popMatrix();
}
Answers
your pointPaths look like they are actually handles because you're calling getHandlesInPaths()
documentation is sparse but there's this:
so i'm thinking you're getting control points as well as path points.
there is a getPointsInPaths(). can you try that?
Okay, good suggestion, but I'm afraid it made little difference. Also, other non-curve paths start just fine.
Here's a pic of the output using this edited code:
RPoint[][] pointPaths = shp.getPointsInPaths();
Anyone have any additional suggestions?
Bump - anyone.....?