New feature: Part Offset2D

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

New feature: Part Offset2D

Post by DeepSOIC »

0.17.8350: New tool introduced to Part workbench: 2D offset. It can offset planar wires.
It has two modes to offset open wires, and three join types (two of which seem to function exactly the same, though).
offset-collective.png
offset-collective.png (102.34 KiB) Viewed 5475 times
Supported inputs: Wire, or Compound of wires (I also have in plan to support planar faces, hope I'll do it eventually). If 'Intersection' is ticked, the wires must be on the same plane; the interference of offsets is then taken into account (like on screenshot). If not, the wires are offset completely independently, and the planes of wires may differ.

Output: Wire/compound, of Face/compound (if 'Fill' is ticked). Filling an offset when 'Intersection' is ticked is not supported yet.

This was tested on OCC 7. On older OCC, the behavior may differ. In particular, I know that Skin mode (open wire to yield open wire) is not supported.

Also, "makeOffset2D" Python method was added to Part.Shape, mirroring this functionality.

Known bugs:
Attempting to turn a circle inside-out by offsetting it inwards by more than its radius causes a crash inside OCC. On Windows, the crashes should be handleded in release builds. But on Linux.. I don't know, it may just downright crash. So use with caution.
User avatar
Gift
Posts: 769
Joined: Tue Aug 18, 2015 10:08 am
Location: Germany, Sauerland

Re: New feature: Part Offset2D

Post by Gift »

Nice to make shims. Thx!
Attachments
Shim_050.FCStd
(20.07 KiB) Downloaded 125 times
Shim_049.FCStd
(18.91 KiB) Downloaded 109 times
User avatar
Gift
Posts: 769
Joined: Tue Aug 18, 2015 10:08 am
Location: Germany, Sauerland

Re: New feature: Part Offset2D

Post by Gift »

Is it possible to change the arc radius(green)?
Attachments
arc.png
arc.png (111.71 KiB) Viewed 5339 times
Pressing.FCStd.zip
(6.78 KiB) Downloaded 112 times
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: New feature: Part Offset2D

Post by DeepSOIC »

Gift wrote:Is it possible to change the arc radius(green)?
The arc radius is equal to offset value, and can't be changed independently. You can get rid of the arc by using Skin mode + Fill offset, and then applying fillets to the final object (revolution).
User avatar
Gift
Posts: 769
Joined: Tue Aug 18, 2015 10:08 am
Location: Germany, Sauerland

Re: New feature: Part Offset2D

Post by Gift »

Thx!
Attachments
Pressing_without_arc.FCStd.zip
(7.08 KiB) Downloaded 114 times
User avatar
Gift
Posts: 769
Joined: Tue Aug 18, 2015 10:08 am
Location: Germany, Sauerland

Re: New feature: Part Offset2D

Post by Gift »

Pls see Images in the attachment.
Attachments
Shim.jpg
Shim.jpg (34.59 KiB) Viewed 5201 times
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: New feature: Part Offset2D

Post by DeepSOIC »

since 0.17.8573:
Part 2D offset can now operate on planar faces. The result is always a face/multiple faces.

For example: this can be obtained in just one step from Part Slice example project:
offset-face-example.png
offset-face-example.png (161.36 KiB) Viewed 4881 times
offset-face-example.FCStd
(56.51 KiB) Downloaded 105 times
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: New feature: Part Offset2D

Post by triplus »

I tested the feature and the results look good. One thing i noticed is when Draft Circle is used the tool only works good if the circle center point is at coordinate system center.
DraftCircle.png
DraftCircle.png (8.05 KiB) Viewed 4834 times
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: New feature: Part Offset2D

Post by DeepSOIC »

triplus wrote:One thing i noticed is when Draft Circle is used the tool only works good if the circle center point is at coordinate system center.
looks like we have a bug..
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: New feature: Part Offset2D

Post by triplus »

Note that on Ubuntu 16.04 if i test this with daily PPA i get this instead when trying to do 2D offset of draft circle:

Code: Select all

Exception: BRepOffsetAPI_MakeOffset has crashed! (Unknown exception caught) 
P.S. And the final result is FreeCAD will crash.
Post Reply