-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhance] can provide pure draw shape api for third api to draw? #334
Comments
Hi, Even though Gerber provides finite set of basic shapes, it becomes nontrivial to implement them when we take into account transformations with different origins they have to support. This would require a lot of code to handle individual shapes separately if you can even figure it all out considering how tricky composed transformations can get. With line/arc approach, everything is much more viable to implement and extend in the future, since everything is a collection of points. With that said, If you want to create image or gerber file, please look into builder APIs, If you want to modify exiting code, you will probably need to wait for optimizer API to handle modification on existing files at Gerber AST level. This one is tricky, as it may appear that modifying Gerber file is as trivial as adding single draw wherever we feel like, but since Gerber is stateful, you have to always account for changes in state you have to do and undo to achieve shape with desired properties. If you want to implement rendering of Gerber files with different tools, like In the future I will be looking into providing AST walking with hooks for more abstract concepts like shapes etc instead of individual AST node, but research has to be done here first. |
Useless blob of code you have made, neither it solves the issues nor it works. |
@jekoie I would appreciate feedback from you regarding this issue and my response 😄 |
Only use points just use fitting method(like Taylor series), those points approximate a polygon, this will made draw method cost more time and slowly. |
Ok, could you provide proof of concept for your request? Some basic code how would you incorporate in extisting source. Then we can follow up on that. |
I notes that
RVMC.commands
decompose the shape toLine
andArc
, just two shape.The raw gerber file have mang shapes likeLine
,Rectangle
,Obround
,Polygon
,Arc
,Circle
andPrimitives(AM commands)
.So can you provide basis geometry shape api, for that i can draw and manipulate the shape item by myself, not just a pictuer.For example draw gerber on
pycairo
,Qt
,tkinter
and so on.The text was updated successfully, but these errors were encountered: