Skip to content

Experimenting writing a variant, question about your design choices

Hi,

I've read "This add-on is just a way to scratch my own itch." and I try to improve myself into Blender Python with a pet project around the same purposes as Flatterer that I may use in a FabLab in France.

I imagine myself trying to document a little workflow at the Fablab from a cooked Blender file with an embed AssetLibrary of basic plywood objets and basic assembling "patterns" or objects, and let users work with existing non planar objets as long they mark which faces they want to send to 2D export.

I am considering making a fork with some modifications in the way the user can work with the plugin, with very little chances that I will run this on the long term. I don't want things merged, I have questions to better understand your work.

My starting point was : installing the plugin, opening a Blender default scene (leaving "Cube" as is), seting scene to mm, pressing your SVG Export button, getting a -inf error around to int conversion for packer, doubting about my installation, then, reaad a bit of code, then later reading the very last line of the doc page : "Flatterer doesn’t slice 3D shapes. Instead, it requires that you yourself already work with flat surfaces. "

I wasn't expecting slicing, I was thinking it will probably work with something in UI allowing to mark which faces to export, with no flattening maths, just projecting 3D points in the 2D plane defined by the face selected.

On the data side, my current understanding of your export code is :

In:   Iterable[bpy.types.Object]
Then: list[AnnotatedMesh]
Then, per object: FlattenedMesh (the combined one)
Then, per object: dict[MeshType, list[FlattenedMesh]] ( .split() )
Then: list[MeshBoundary]
And:  PackResult
Out: SVG XML

Considering AnnotatedMesh contains only edges: list["AnnotatedEdge"] that contains only :

verts: tuple[Vector3, Vector3]
edgeType: MeshType

it seems that is hard for me to introduce a notion of "mark faces you want to export" without making huge changes.

It seems also that your code walk vertices edge by edges and not make use of Blender Faces. Is there is a fundamental reason I don't catch yet around this ? Is it related to holes and boolean operations ?

Thanks for the great work and reading this too long not-really-an-issue thing.