I am having trouble getting the lines or circles out of CirculinearDomain2D obtained as a result of using getBuffer method on a SimplePolygon2D object.
I can draw the result to a frame buffer with draw method but I have not found how can I get the list of points (or lines and curves) it is made of, which is needed by my application.
you firsty need to extract the boundary of the domain (via the getBoundary()) method.
The boundary is an instance of Curve2D interface, so you can extract points with the getVertices() method.
You can also iterate on the continuous curves that constitute the boundary (Curve2D.getContinuousCurves()), extract each smooth curves (ContinuousCurve2D.getSmoothPieces()), and test if it is circle arc or line segment.
Hope this helps ?
Thanks a lot.
I am sorry I was not able to figure that out by myself.
it's not always easy to undersatnd an API, and I also should write more demos/tutorials…
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.