The offset (inset or outset) code relies upon the use of cross-products of 3D vectors to displace copies of the line segments making up the polygon. Then it calculates the intersections between the displaced copies, using the topological relationships from the original polygon to help. The resulting line intersections then become the new end points of the displaced copy line segments. In this way the line segments are extended or truncates as necessary. As can be seen from the bottom left example, further work is needed to deal with concave polygons more comprehensively.
Offset and straight skeleton examples. The upper right is incomplete. |
I've also got the initial GUI work for the scripted model generation code into better shape. It is still far from complete, but is at least presentable. The main inspirations are the Windows GUI for POV-Ray and the OpenSCAD GUI. I was aided by a tutorial at CodeProject, and by the MVVM example provided with the AvalonDock component (look under Version 2.0/AvalonDock.MVVMTestApp). Various bits of documentation for the AvalonEdit component, including forums, were also of some assistance.
I hope to have something more to show in the next few days.
Tabbed editor for PowerShell scripts that can create 3D models |
I hope to have something more to show in the next few days.
No comments:
Post a Comment