Feature request thin element for Part and PartDesign workbench

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
onekk
Veteran
Posts: 6222
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Feature request thin element for Part and PartDesign workbench

Post by onekk »

jonasb wrote: Sat Jan 15, 2022 1:53 pm Such a hypothetical "Thickness2D" could be similar to Part Offset2D, but producing not only one offset, but two: one on each side of the referenced lines.
Yes and No, it depends, on whta you are trying to do.

Usually using offset you are otaining different shapes as offset tend to make things using some math behind that make

This code:

Code: Select all

def wire_shape():
    pol_r = (
        (000.0, 00.0, 0.0),
        (135.0, 00.0, 0.0),
        (135.0, 48.4, 0.0),
        (131.0, 54.3, 0.0),
        (105.1, 56.6, 0.0),
        (070.0, 58.5, 0.0),
        (053.3, 59.4, 0.0),
        (025.8, 82.0, 0.0),
        (002.8, 82.0, 0.0),
        (000.0, 67.2, 0.0),
        (000.0, 00.0, 0.0)
    )

    rim_profile = Part.makePolygon(pol_r)
    # Part.show(rim_profile, "rim_profile")
    return rim_profile

obj = wire_shape()

Part.show(obj, "original_wire")

o_off = 1.5

obj1 = obj.makeOffset2D(o_off * -1)

Part.show(obj1, "neg_off_wire")

obj2 = obj.makeOffset2D(o_off)
Will result in this shape (one corner shown):
offset_1.png
offset_1.png (5.99 KiB) Viewed 970 times
maybe this is what you want, maybe not.

Using GUI Offset2D could use a different strategy to offset corners, when I've used it on my "original_wire" polygon, using mode=Pipe, join=Tangent.

I obtain:
off_gui.png
off_gui.png (7.24 KiB) Viewed 970 times
At least in FreeCAD 0.20, Libs: 0.20R26720 (Git).

What is correct, for me GUI way is more correct, but makeOffset2D method is more coherent from what I was used in other CAD/CAM as on a corner the "correct" constant distance is a radius, like when cutting with a cnc.

This pose a question? How to achieve this behaviour with Scripting?

Sorry for some OT parts.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
freecad-heini-1
Veteran
Posts: 7791
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Feature request thin element for Part and PartDesign workbench

Post by freecad-heini-1 »

freecad-heini-1 wrote: Sat Jan 15, 2022 7:34 am
wmayer wrote: Sun May 03, 2020 9:19 am issue #0004334
Friendly reminder of this feature request
"thicken a sketch". Thank you
Is there anything new about this yet?
User avatar
FBXL5
Posts: 994
Joined: Sat Aug 03, 2019 8:45 pm

Re: Feature request thin element for Part and PartDesign workbench

Post by FBXL5 »

I'd like to have such a tool in PartDesign, too. I still use SheetMetal_AddBase as a workaround, as long as I can live with its automatically inserted radii.
User avatar
kadet
Posts: 102
Joined: Mon Aug 21, 2023 8:15 pm
Contact:

Re: Feature request thin element for Part and PartDesign workbench

Post by kadet »

I've created new issue: https://github.com/FreeCAD/FreeCAD/issues/10538 in the comment is my initial idea for how this feature could be implemented, based on simple experiments with API and FreeCAD. Feel free to share your thoughts.

Side note: Technically there already is imported issue based on #0004334: https://github.com/FreeCAD/FreeCAD/issues/6057, but it's old, has no real description and because of that is neither informational or discoverable. Personally I'd suggest to close it as duplicate of mine which should be more discoverable.
Post Reply