Josh780 wrote: ↑
Wed Jul 01, 2020 3:51 am
I'd like to create a part with a variable length that can be assigned/changed during assembly. Specifically, I'm building a model of a PVC structure, and it would be nice to create a single PVC pipe part that could be assigned different lengths for each copy in the assembly rather than create multiple parts for every possible length being used.
Josh. Not quite what you're looking for but I'll throw it out here anyway. This is for A2plus.
I just posted some files for a workbench that I use but it is not FreeCAD approved. With it you can change a part’s shape with a few button clicks.
Overall process for changing a part file: You create a pipe file and insert that file in your assembly. Then using that file as your “base” you need to copy the file and change it for each length (which you don’t want to do). You then put the modified files in the assembly but don’t constrain them. You can then change the files using the constraint Viewer part of the work bench I made. I'll put step by step here.
Add the files to the assembly.
Open the work bench and click the lantern which will open the viewer.
Select the part you want to change.
Click on the "misc" menu then "Change Part".
Click on the part to replace the first part. They should swap places.
Warnings: The files do not change. It is only swapping the shapes between the bodies. I have not tested it because it was just a fun thing to try but if you’re working on some temporary files it might work. No one has tested these files, I’m not sure if they will run on any machine but mine. The workbench helps me reduce the number of broken constraints that are made when a part is modified in A2plus.