Clone of sketch for Part Design
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Clone of sketch for Part Design
Is there any reason, why a clone of a sketch can not be used to start a Part-Design-shape?
The use of a clone of a sketch could be useful in a lot of cases, where two parts have to be modeled with some comon dimensions. A typical example is a box with a separate cover.
Ulrich
The use of a clone of a sketch could be useful in a lot of cases, where two parts have to be modeled with some comon dimensions. A typical example is a box with a separate cover.
Ulrich
Re: Clone of sketch for Part Design
A clone object only copies the shape of an object. All other properties and type information are lost. The result of a clone is a Part::FeaturePython object and not a Sketch.ulrich1a wrote:Is there any reason, why a clone of a sketch can not be used to start a Part-Design-shape?
I think we should implement another way to allow reusing a sketch.
Re: Clone of sketch for Part Design
And what about using the command "Duplicate selection" from the Edit menu?
Re: Clone of sketch for Part Design
Because Clone make a copy that is parametrically bound to the original object. If the original change the Clone change too.
Duplicate just make a copy but there isn't link with the original object.
Duplicate just make a copy but there isn't link with the original object.
Formations - Assistance - Développement : https://freecad-france.com
Re: Clone of sketch for Part Design
There is a link. Make a cube, select a face and create a sketch. To the sketch you can add a rectangle or also an external geometry. Now close the sketch, select it and use "Duplicate selection". When I edit now the copied sketch I can see all geometries, external geometries and constraints.Duplicate just make a copy but there isn't link with the original object.
Then you can verify with Dependency graph that the link to the support face is really there.
Re: Clone of sketch for Part Design
But only for mapped faces and not for the actual Sketch geometry.wmayer wrote:There is a link.Duplicate just make a copy but there isn't link with the original object.
Re: Clone of sketch for Part Design
Sorry but what do you miss then?
Re: Clone of sketch for Part Design
I do miss the possibility defining some dimensions at one place for a sketch and then base two different parts on this common set of dimensions.wmayer wrote:Sorry but what do you miss then?
One possibility would be the use of a cloned object. The inner definitions of cloned sketch would not be editable like a sketch. But the Part-Design-Workbench could use the wires of the clone as a starting sketch.
Alternative I am thinking about a totally different approach: Is there a possibility to disclose named constraints of a sketch as properties of this sketch in the sketch properties tab together with the placement of the sketch. This would allow to change key constraints without opening of the sketch. Then those properties could be accessed by a spreadsheet. This would allow to define some key values in a spreadsheet and different sketches with Part-Design-shapes could be based on these values.
Ulrich
Re: Clone of sketch for Part Design
We could do it easily by a new Part2DObject derived feature. It links to a sketch (or and other Part2DObject) and has its own placement. It would simply follow the sketch...
Stop whining - start coding!
Re: Clone of sketch for Part Design
Similar to the Draft clone, but based on a Part2DObject instead... Good idea.
I'm committing a small change to the Draft Clone object. Now, if you make a clone from a Part2DObject, like a sketch or a 2d draft object, the clone is also a Part2DObject, so you can use it as a base for any operation that require such an object. The name of the clone will reflect that it is 2D.
If the linked shape of the clone is changed and is not a 2D object anymore, such 2D clone will refuse to compute a shape and issue a warning message.
I'm committing a small change to the Draft Clone object. Now, if you make a clone from a Part2DObject, like a sketch or a 2d draft object, the clone is also a Part2DObject, so you can use it as a base for any operation that require such an object. The name of the clone will reflect that it is 2D.
If the linked shape of the clone is changed and is not a 2D object anymore, such 2D clone will refuse to compute a shape and issue a warning message.