Offsetting sketch to global planes.
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
Re: Offsetting sketch to global planes.
I was in PartDesign and No I didn't download your file, Oops. I see what your issue is now.
Using Part, I need to add a standard shape so the sketch has something to reference. That seems OK.
Using Part, I need to add a standard shape so the sketch has something to reference. That seems OK.
Re: Offsetting sketch to global planes.
That's what I experience here. Changing the AttachmentOffset does nothing to the sketch.edwilliams16 wrote: ↑Thu Dec 01, 2022 3:16 am When I do that the attachment is ignored - but not zeroed out. Placement isn't updated. Check the coordinates of the center vertex. It shows as origin.
Agreed. Would it be sufficient to make the AttachmentOffset visible and just add it to the Placement? And if so, should that work for non toplevel sketches - or objects in general - be enabled too?Only if I create the sketch on the XY_Plane. If I try to offset from the XZ_Plane, I have to do the mental gymnastics of what the compounded placement looks like, since the Placement already has a rotation.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Veteran
- Posts: 3180
- Joined: Thu Sep 24, 2020 10:31 pm
- Location: Hawaii
- Contact:
Re: Offsetting sketch to global planes.
Attaching to a Part Plane Flat-face is a work-around I use.
It's only top-level sketches that are annoyingly different to those inside a Part or Body which already have available coordinate systems to attach to.chrisb wrote:Agreed. Would it be sufficient to make the AttachmentOffset visible and just add it to the Placement? And if so, should that work for non toplevel sketches - or objects in general - be enabled too?
Perhaps there could be a global Origin object that top-level objects could be attached to? But I don't know what side-effects that might cause.
Alternatively, when top-level objects have an Attachment Placement editable even when their MapMode is deActivated, the Placement should be compounded as you suggest. But this seems not to be backward compatible when you take the Placement out of the direct control of the user, as is done with an active attachment.
Maybe Attachment Placements shouldn't be modifiable when MapMode is deactivated? Doesn't help, but at least reduces confusion.
Maybe there are cleaner solutions...
Re: Offsetting sketch to global planes.
The way I think of it is that the Attachment object (and offsets defined by it) only make sense when there is a container object involved and it is referenced to the global coordinate system.
When there is no container involved the the Placement object defines the location of the object.
And, until there is some other object to attach to, Attachment makes no sense.
When there is no container involved the the Placement object defines the location of the object.
And, until there is some other object to attach to, Attachment makes no sense.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Re: Offsetting sketch to global planes.
I agree, but I also see the reasonable request, e.g. to offset a sketch not lying in XY plane from its plane by just changing its z value. Any ideas? Is it advised then to use a Part container?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Offsetting sketch to global planes.
Doesn't simply changing the Z value of the Placement value accomplish this? The Root point of the sketch is then offset from the global origin.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
- adrianinsaval
- Veteran
- Posts: 5551
- Joined: Thu Apr 05, 2018 5:15 pm
Re: Offsetting sketch to global planes.
If you need an origin object just create a Part container and work inside that.
Re: Offsetting sketch to global planes.
No. On sketch creation you are asked about the main plane. If you select XZ plane, the result is a change of the Placement. An offset in z doesn't move orthogonal to the sketch plane, but rather in global z, which is the sketch's y direction.
While this can be seen as some light brain training, things get really difficult if the sketch is rotated by some other degrees.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Offsetting sketch to global planes.
Ah yes, I was running on no coffee.chrisb wrote: ↑Thu Dec 01, 2022 12:00 pmNo. On sketch creation you are asked about the main plane. If you select XZ plane, the result is a change of the Placement. An offset in z doesn't move orthogonal to the sketch plane, but rather in global z, which is the sketch's y direction.
While this can be seen as some light brain training, things get really difficult if the sketch is rotated by some other degrees.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
-
- Veteran
- Posts: 3180
- Joined: Thu Sep 24, 2020 10:31 pm
- Location: Hawaii
- Contact:
Re: Offsetting sketch to global planes.
So using the existing code I see a couple of workarounds to create offset sketches.
In this forum we typically advocate attaching sketches to offset global planes to avoid TNP, but I don't think we explain that in Part workbench this is not as straightforward as it might seem. We also chide people for unnecessarily wrapping their models in Part Containers, when on occasion this might be appropriate even if no assembly operations are anticipated.
- Drag your current model into an outer Part container and attach your new sketch to its coordinate system.
- Create a Part 'reference cube', select the face on the desired plane and create your sketch with the default FlatFace attachment.
In this forum we typically advocate attaching sketches to offset global planes to avoid TNP, but I don't think we explain that in Part workbench this is not as straightforward as it might seem. We also chide people for unnecessarily wrapping their models in Part Containers, when on occasion this might be appropriate even if no assembly operations are anticipated.