Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base Shape Tub, Hat and Box size wrong #298

Open
RexLinz opened this issue Feb 9, 2024 · 2 comments
Open

Base Shape Tub, Hat and Box size wrong #298

RexLinz opened this issue Feb 9, 2024 · 2 comments

Comments

@RexLinz
Copy link

RexLinz commented Feb 9, 2024

Creating any of Tub, Hat or Box the resulting size of the resulting is wrong in one dimension.

Test:

  1. Create a Base Shape "Tub" with thickness=1mm, radius=1mm, length=30mm and width=20mm.
  2. Measure outside dimensions which will be 22x30 mm.

Screenshot attached.

Cause:
For Tub, Hat and Box width AND length has to be corrected by 2.0 * bendCompensation but just length is done so.

Solution:
I have changed the code in SheetMetalBaseShapeCmd.py, function smCreateBaseShape starting line 141 to expicitly deal with all cases as shown below.

def smCreateBaseShape(type, thickness, radius, width, length, height, flangeWidth, fillGaps):
    bendCompensation = thickness + radius
    height -= bendCompensation
    if type == "U-Shape":
        numfolds = 2
        width -= 2.0 * bendCompensation
    elif type == "Tub" or type == "Hat" or type == "Box":
        numfolds = 4
        width -= 2.0 * bendCompensation
        length -= 2.0 * bendCompensation
    else:
        numfolds = 1
        width -= bendCompensation
...

SheetMetalSize

shaise added a commit that referenced this issue Feb 10, 2024
@shaise
Copy link
Owner

shaise commented Feb 10, 2024

You are definitely correct. Thanks!

@RexLinz
Copy link
Author

RexLinz commented Feb 10, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants