SubShapeBinder 2D offsetting PR #6338

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

SubShapeBinder 2D offsetting PR #6338

Post by TheMarkster »

https://github.com/FreeCAD/FreeCAD/pull/6338

This PR adds 2D offsetting for the green SubShapeBinders. For example, you can select a sketch in the tree, make a green SubShapeBinder of it, then offset the binder. You can also make a binder of a face and offset it, but better to use a sketch for protection against TNP.

In the image below a face of an AdditiveBox has been offset using the binder. Note the new property group "Offsetting" and related properties.
Snip macro screenshot-096fd0.png
Snip macro screenshot-096fd0.png (89.7 KiB) Viewed 1223 times
Offset gives the amount of the offset in mm. A value of 0.0 (default) means do no offsetting. If negative, the offset is inwards.

OffsetJoinType is an enumeration: "Arcs" (default), "Tangent", "Intersection".

OffsetFill (boolean). If True, a face is made between the offset and the original wire.

OffsetOpenResult (boolean). If True, an open result is allowed when offsetting an open wire.

OffsetIntersection (boolean). Affects the way inner wires are handled, offset outwards or inwards.
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: SubShapeBinder 2D offsetting PR #6338

Post by TheMarkster »

I found a crash during testing. To reproduce:

You need to install WireFilter macro and run it once, letting it create the file it wants to make (wirefilter.py).
Open attached file, select WireFilter object.
Set OffsetFill property to True.

I have added a fix for the crash to the PR, but there might be a better way to do it.
Attachments
binder_offset_test.FCStd
(16.17 KiB) Downloaded 80 times
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: SubShapeBinder 2D offsetting PR #6338

Post by TheMarkster »

To make the binder on the face of a part workbench cube.

In part workbench create a default cube.
In part design workbench select the top face, click the green subshapebinder toolbar icon. (no need to create a body)
Select the binder, in the Offsetting section set the desired offset properties.
Set Offset to 2
Set Offset Join Type to Tangent
Set Offset Fill to True (this creates a face between the original face and the new outer wire -- if false you get a single face using only the outer wire)

Alternatively, a Part Design Body can be made, add an additive box, and make the green subshapebinder of one of the additive box faces.
Post Reply