New feature: Part Offset2D

Info about new implemented features, classes, modules or APIs. Might get technical!
DeepSOIC
Posts: 4466
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

New feature: Part Offset2D

Postby DeepSOIC » Fri Sep 02, 2016 6:13 pm

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 1364 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: 88
Joined: Tue Aug 18, 2015 10:08 am

Re: New feature: Part Offset2D

Postby Gift » Tue Sep 06, 2016 6:24 am

Nice to make shims. Thx!
Attachments
Shim_050.FCStd
(20.07 KiB) Downloaded 22 times
Shim_049.FCStd
(18.91 KiB) Downloaded 15 times
User avatar
Gift
Posts: 88
Joined: Tue Aug 18, 2015 10:08 am

Re: New feature: Part Offset2D

Postby Gift » Tue Sep 06, 2016 8:14 pm

Is it possible to change the arc radius(green)?
Attachments
arc.png
arc.png (111.71 KiB) Viewed 1228 times
Pressing.FCStd.zip
(6.78 KiB) Downloaded 17 times
DeepSOIC
Posts: 4466
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: New feature: Part Offset2D

Postby DeepSOIC » Tue Sep 06, 2016 9:05 pm

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: 88
Joined: Tue Aug 18, 2015 10:08 am

Re: New feature: Part Offset2D

Postby Gift » Wed Sep 07, 2016 7:35 pm

Thx!
Attachments
Pressing_without_arc.FCStd.zip
(7.08 KiB) Downloaded 14 times
User avatar
Gift
Posts: 88
Joined: Tue Aug 18, 2015 10:08 am

Re: New feature: Part Offset2D

Postby Gift » Thu Sep 08, 2016 11:48 am

Pls see Images in the attachment.
Attachments
Shim.jpg
Shim.jpg (34.59 KiB) Viewed 1087 times
DeepSOIC
Posts: 4466
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: New feature: Part Offset2D

Postby DeepSOIC » Sun Oct 02, 2016 12:28 pm

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 766 times
offset-face-example.FCStd
(56.51 KiB) Downloaded 8 times
triplus
Posts: 4845
Joined: Mon Dec 12, 2011 4:45 pm

Re: New feature: Part Offset2D

Postby triplus » Mon Oct 03, 2016 7:34 pm

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 719 times
DeepSOIC
Posts: 4466
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: New feature: Part Offset2D

Postby DeepSOIC » Mon Oct 03, 2016 7:56 pm

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
Posts: 4845
Joined: Mon Dec 12, 2011 4:45 pm

Re: New feature: Part Offset2D

Postby triplus » Mon Oct 03, 2016 8:42 pm

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.