Remove a value from surface thickness

Options
Pernelle Marone-Hitz
Pernelle Marone-Hitz Member, Moderator, Employee Posts: 827
First Comment First Anniversary Ansys Employee Solution Developer Community of Practice Member
edited June 2023 in Structures

Is there a way to remove a defined value from the thickness of surface bodies in Mechanical?

Tagged:

Answers

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 827
    First Comment First Anniversary Ansys Employee Solution Developer Community of Practice Member
    Answer ✓
    Options

    The following example can be used:

            removeThickness = 0.0005
            bodiesList = ExtAPI.DataModel.Project.Model.Geometry.GetChildren(DataModelObjectCategory.Body,True)
            geoData=ExtAPI.DataModel.Project.Model.Analyses[0].GeoData
    
            for body in bodiesList:
                geoBody=body.GetGeoBody()
                if geoBody.BodyType==GeoBodyTypeEnum.GeoBodySheet:
                    if (geoBody.Thickness-removeThickness)>0:
                        geoBody.Thickness=geoBody.Thickness-removeThickness