You’re right, I made some repetitive text.
Now will try to get clear:
- the efficiency of tool is defined by it’s usability inside a workflow. So the beginning of implementation is to plan a general work-flow.
- The most simple way to get parts positioned: make guidelines → constrain to guidelines.
In complex cases constraining to details is easier and more obvious, then constraining to guidelines.
But practice showed, that constraining to guidelines can replace constraining to parts, not the opposite.
Why? Because in the FC the most sophisticated solver and parametrisation is inside the Sketcher, so it is easier to make a sketch with constraints, than to calculate positions / interposition in Draft.
The efficient tool complex in this case would look like:
DynamicData (<-Set values)
Sketcher → Constraints (<-DynamicData)
->>guidelines → constrain to guidelines with A2P / A2Pmore
But here arises the problem: A2P(a2PMore) does not consider guidelines “Placement == Fixed” on calculation - it makes changes to position of Sketch and even altered some sketches.
So the key-solution for this case would be - to set a Sketch as the base of solving, aka Sketch{fixedPosition == true}
Then sketches would become one of possible the assembling bases. This resembles SW? Well - that’s not so bad.
Other step-to-usability would be, if the A2P/A2PMore could constrain parts/bodies, containers inside the master-file.
Then it would be very easy to “copy-paste-position” similar parts. The last version of A2P showed ability to constrain parts inside the file itself (without import). But also the first part must have the fixedPosition=true, and so must be imported.
Also the real work-flow sometimes goes different:
– sometimes it is easier to work in A2PMore manner, sometimes I turned off [auto-solve] and first applied constraints, then pressed [solve].
So at this moment as a workbench - the best seems to be the combination of A2P/A2PMore tools in a single workbench.
So I did: Tools → Customize → Toolbars → A2P → new toolbar → import all new tools from A2PMore
But still the very case-to-solve is to set fixed position to sketches.
Maybe drafts are not movable by A2P, and it is possible to convert sketches to Drafts, but this would remove parametrization.
// Besides: to the head-developers: how difficult would it be to make the “parts-library” macro - the internal part of FC?
I would use such a work-flow:
- Select detail (Part, body, simple link-group, sketch, draft)
- click - [save to LocalPartsLibrary] - [Ask user input: SaveAs “FileName”.FCStd]
→ the detail is saved to the DirPojectFolder\parts\“FileName”.FCStd
- When needed - RClick ->ImportPartFromLocalLibrary
It is similar to importing in an assembly, but is able to utilize all tools of FC( sketches, drafts, parts…)
Especially, that direct copy-paste replication of details is not complete in the GUI if FC.
///////
Just tried to see the A2P Code - maybe the clue is located around a2p_importpart.py Lines 430..450 ?