The image shows two custom sketches for connector cutouts. It makes sense to re-use the shapes, e.g. saved in separate files next to the models of the parts that should go into the cutouts.
This is possible in FreeCAD using the new (green) subShape binder and drag and drop a sketch from another file to it. I use a standard FreeCAd with the cutout sketch only.
For example I have a 3D model EmergencyStopButton.FCSTD and E-StopCutout.FCSTD. For making the panel I only load the StopCutout file and access the sketch with a shape binder. I used DFX export/import before, but that way all Sketcher constraints, dimensions and line connections are lost so it was not a good approach.
Although the SubShapeBinders work pretty well it tends to clutter the tree. Since using Assembly3 my trees tend to be several pages long and I seek ways to shortem them. One would be to load the parametric 2D geometry directly into a sketch.
Thinking about this I find more and more use cases where saving and loading parametric 2D in a native FeeCAD format would be really useful.
Is there a specific reason why FreeCAD does not have a way to save native parametric 2D geometry from Sketcher?
Or is there some simple way to do that with Python like this (in Pseudocode)
GetCurrentDocument().GetSketch() > MySketch.x
GetCurrentDocument().GetSketch() < MySketch.x
Read and Save Parametric 2D Geometry for Sketches
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- adrianinsaval
- Veteran
- Posts: 5541
- Joined: Thu Apr 05, 2018 5:15 pm
Re: Read and Save Parametric 2D Geometry for Sketches
I'm confused, how is a subshapebinder more clutter than a sketch? It's just one object in the three
Re: Read and Save Parametric 2D Geometry for Sketches
You can copy/paste sketches. This is not parametric though.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Read and Save Parametric 2D Geometry for Sketches
In an body the shape binder ist one leaf and an operation as pocket on it is another one. With a sketch the sketch moves as sub-leaf under the pocket.adrianinsaval wrote: ↑Mon Aug 16, 2021 2:56 pm I'm confused, how is a subshapebinder more clutter than a sketch? It's just one object in the three
But I was referring to something else: when a file is opened that uses external shape files all dependet files are also listed in the tree. For example above, it would open a Sub-D9_Cutout.FCSTD and a Connector_Cutout-FCSTD. When I would be using sketches no files would pop up, because there is not link.
Very nice! I was not aware that worked between different files.
But it is parametic. At least it retains its construction geometry, constraints and dimensions. Its even better that within a single file because this awful selection box is not shown.
A good alternative to the shape binder approach.
Thanks
- adrianinsaval
- Veteran
- Posts: 5541
- Joined: Thu Apr 05, 2018 5:15 pm
Re: Read and Save Parametric 2D Geometry for Sketches
Ah, I see your point now.
You could try using the single document mode for the tree view so other files won't be shownBut I was referring to something else: when a file is opened that uses external shape files all dependet files are also listed in the tree. For example above, it would open a Sub-D9_Cutout.FCSTD and a Connector_Cutout-FCSTD. When I would be using sketches no files would pop up, because there is not link.
Re: Read and Save Parametric 2D Geometry for Sketches
I meant it is not parametric in the sense when you change the source where you copied from, then the target will not change. It is rather like a template then.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Read and Save Parametric 2D Geometry for Sketches
Whatever the correct term for that is, I am glad that this is not the case, because it can be a very troublesome feature when you get changes to an existing project due to the change to anothe file stored elsewhere, especially when the link characteristic is not visible from both sides.