Remove a value from surface thickness

Pernelle Marone-Hitz
Pernelle Marone-Hitz Member, Moderator, Employee Posts: 871
100 Answers 500 Comments 250 Likes First Anniversary
✭✭✭✭
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: 871
    100 Answers 500 Comments 250 Likes First Anniversary
    ✭✭✭✭
    Answer ✓

    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