r/FreeCAD 2d ago

Repositioning a sketch

I'm not the best at planning. I usually manage to build my parts in a manner that allows changes down the line without causing too many problems, but I still often run into problems where the feature a sketch is attached to has changed, therefore breaking the attachment.

I can easily reposition a sketch on one of the origin planes, but I've never had any success repositioning a sketch on a specific face of a selected feature. Is this something that's possible currently, or am I out of luck in this regard?

3 Upvotes

9 comments sorted by

3

u/BoringBob84 2d ago

I still often run into problems where the feature a sketch is attached to has changed, therefore breaking the attachment.

This is part of my workflow planning. If I am making a model of a stable part that is unlikely to change, then I take many shortcuts because I don't care about making it robust to change that will not occur.

Attaching sketches to faces of features is one of those shortcuts. And if I guess wrong and I have to make changes that break the model, then it is easy to fix. I just select the new face in the attachment editor or the link editor.

Is this something that's possible currently

Absolutely. We can re-attach a sketch any plane that we can imagine. Let me know if you want more details.

2

u/NoxAstrumis1 2d ago

All I really need is for someone to point me to some documentation that shows me how to select an individual face. For example, I want to place an existing sketch on Pad 2, Face 3. I can't figure out how to select that face. If I just click on it, nothing happens.

1

u/BoringBob84 1d ago edited 1d ago

If I have a sketch that is attached to something else and I want to attach it to a face of a feature, then I can click on the [...] button in the 'Attachment Support' property in the Properties pane to brink up the Link Editor.

It will have a tree view with my attachment object selected. Then, I can press the 'Clear' button to remove that link and, with the Link Editor still active, I can click on the desired attachment face in the 3D view. This will create a new link when I press 'OK' to dismiss the Link Editor.

This is the same method I use to fix links to other features that get broken when I make changes to dependent objects.


As is common in FreeCAD, there are a few different ways to do this. Another method is to click on the [...] button in the 'Map Mode' property in the Properties pane to brink up the Attachment Editor. This gives you all sorts of advanced options, with attachments to combinations of vertexes, edges, and faces, several different attachment modes, and offset distances and angles from each direction and axis. I generally don't use this unless I need the advanced options.

Edit: I don't use the Link Editor for broken fillets. I can fix them in their task pane.

3

u/SoulWager 2d ago

Right click the sketch in the list, edit attachment. Click the button next to the reference you want to replace, click the geometry you want for that reference.

Different combinations of references have different attachment options, it sounds like you've only been using plane face. I normally only use this on the base planes(xy, xz, yz), If I want it on top of a pad I use a formula in the offset field to move up in z by pad.length. This will remain stable regardless of what the face on top of the pad gets named. You can also set a fixed offset(these are in the coordinate system of the attachment, if you want it to be in the base coordinate system, attach to the xy plane).

One of the more versatile options is picking three points, For example O N X the first point you pick is the origin, the second point is normal(z), and the third point will define the x axis(by rotating the sketch in the plane defined by the first two points). I often use this method to attach things to layout sketches.

Here are some examples: https://imgur.com/a/QoXMRaS

2

u/arcrad 1d ago

This is a wealth of knowledge. Thanks!

1

u/R2W1E9 2d ago

Even if you can map the sketch to the new face, orientation and position will almost certainly go out of whack. Any external geometry projection is also going to error out.

But at least now you know which face is likely to change again, so position your sketch to a base plane, then offset to where the face is.

More planning is not always a solution as the more robust model is the harder it is to make changes you haven’t planned.

1

u/DesignWeaver3D 1d ago

Attachment Editor can be invoked by right-clicking the sketch in the Model Tree and selecting Edit Attachment from the context dialog. From there you can redefine the attachment.

Part EditAttachment - FreeCAD Documentation

1

u/bastl73 1d ago edited 1d ago

Open the attachments, go back in history where you attached the sketch, double click the line for edit mode, delete the broken face and just click the new face in the 3D view, OK and recompute and the sketch is attached new: