New feature: Part Offset2D
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
New feature: Part Offset2D
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). 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.
It has two modes to offset open wires, and three join types (two of which seem to function exactly the same, though). 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.
Re: New feature: Part Offset2D
Nice to make shims. Thx!
- Attachments
-
- Shim_050.FCStd
- (20.07 KiB) Downloaded 128 times
-
- Shim_049.FCStd
- (18.91 KiB) Downloaded 109 times
Re: New feature: Part Offset2D
Is it possible to change the arc radius(green)?
- Attachments
-
- arc.png (111.71 KiB) Viewed 5346 times
-
- Pressing.FCStd.zip
- (6.78 KiB) Downloaded 113 times
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: New feature: Part Offset2D
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).Gift wrote:Is it possible to change the arc radius(green)?
Re: New feature: Part Offset2D
Thx!
- Attachments
-
- Pressing_without_arc.FCStd.zip
- (7.08 KiB) Downloaded 117 times
Re: New feature: Part Offset2D
Pls see Images in the attachment.
- Attachments
-
- Shim.jpg (34.59 KiB) Viewed 5208 times
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: New feature: Part Offset2D
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:
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:
Re: New feature: Part Offset2D
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.
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: New feature: Part Offset2D
looks like we have a bug..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.
Re: New feature: Part Offset2D
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:
P.S. And the final result is FreeCAD will crash.
Code: Select all
Exception: BRepOffsetAPI_MakeOffset has crashed! (Unknown exception caught)