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.
Thanks,
misan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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 ?
regards,
David
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2012-05-30
Thanks a lot.
I am sorry I was not able to figure that out by myself.
Kind regards,
misan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
Thanks,
misan
Hi,
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 ?
regards,
David
Thanks a lot.
I am sorry I was not able to figure that out by myself.
Kind regards,
misan
Hi,
no problem,
it's not always easy to undersatnd an API, and I also should write more demos/tutorials…
regards,
David