Skip to content
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

LasercutterSVGExport does not support arrays #113

Open
emutier opened this issue Dec 10, 2021 · 8 comments
Open

LasercutterSVGExport does not support arrays #113

emutier opened this issue Dec 10, 2021 · 8 comments

Comments

@emutier
Copy link

emutier commented Dec 10, 2021

Hi,
I am currently using LasercutterSVGExport in a project which uses the Array feature from the Draft WB. Unfortunately, this is not supported by this macro.
The macro works with the underlying part so I think using the part and the Object->Count information could do the trick. My freecad-scripting and python knowledge is rather basic/non-existent so I hope could by fixed in the future.

@luzpaz
Copy link
Contributor

luzpaz commented Dec 10, 2021

CC @chbergmann

@chbergmann
Copy link
Contributor

There is a workaround: Select your Array, then go to Part workbench, Menu Part -> Compound -> Explode compound
This will create a folder with all elements inside your Array. Select all elements and then start LasercutterSVGExport

@emutier
Copy link
Author

emutier commented Dec 12, 2021

Hi luzpaz, hi chbergman,
thanks for your fast answers! My workaround was to clone the part. Although it is okay for the export it is sub-optimal for my model.
As far as I have understood your code "for sel in selection" is the main loop. So before creating the offset one could check if sel is of type array. If so, assign Object->Base as sel and use Object->Count to initialize an inner for loop (else set the inner loop value to 1). The remaining code could stay the same.

I tried it myself but failed to find out how to check for Array-Type and also failed to use the debugger. It simply ignored my breakpoints... really frustrating. I am willing to contribute but I need some push in right direction :)

off-topic: what are the chances to combine this macro with deepnest https://github.com/Jack000/Deepnest? I think the core is written in Python and C++.

@chbergmann
Copy link
Contributor

I made a change: The macro checks if there are multiple solids in the selected object and creates an outline for each. This is more generic approach and should work not only for arrays.
The macro is also present as a tool in the Curved Shapes workbench.

Deepnest cannot be integrated easily. It has to be installed or compiled on your PC first.

@luzpaz
Copy link
Contributor

luzpaz commented Dec 15, 2021

What about https://wiki.freecadweb.org/Arch_Nest ?

@emutier
Copy link
Author

emutier commented Jun 14, 2022

hi guys,
sorry that I dont answer. I think Dec 2021 was the last time I opened FreeCad :(
@chbergmann thx for the changes. works perfectly fine
@luzpaz I was not able to get arch nest running. could not pick a container. wiki is not really helpful either

@chbergmann
Copy link
Contributor

@luzpaz This issue can be closed

@chbergmann
Copy link
Contributor

@luzpaz The LasercutterSVGExport macro cannot be installed by the addon manager in FreeCAD. why ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants