About Generic naming

Generic naming is a CATIA technique which creates a label whenever an element has been selected interactively. This label is a coded description of the selected element. When you specify a fillet to be applied to a face, you must select interactively the face definition but prior  to doing this you must of course have generated the face to be filleted. This is why scripts requiring face, point or edge definitions cannot be generated in one shot. You don't have to mind about the generic naming itself as it is automatically captured from the geometry area. The thing you have to mind about is the order your instructions are to be written and executed in the script.

Example

The "mechanical" part of the PktPocketCalculator.CATGScript sample is to be generated in two shots:

  1. import the necessary sketches and generate the pads:

    import Input : FilePath "Select the PktInitialSketch.CATPart sample" ;

    calc isa CATPart
    {
    part1 isa Part
    {

    partbody isa BodyFeature
    {
    S1 isa Sketch.1 {}
    S2 isa Sketch.2 {}

    pad1 isa Pad("S2")
    {
    FirstLength = 0.5mm;
    SecondLength=2.0mm;
    }

    fillet1 isa ConstantEdgeFillet ("Face:(Brp:(pad1;0:(Brp:(S2;1)));None:())")
    {
    Radius =1.0 mm;
    }

    pattern1 isa Pattern[4,4] of fillet1
    {
    Step1 =7.0 mm;
    Step2 = 7.0 mm;

    }
    /*
    pad0 isa Pad("S1")
    {
    FirstLength = 5.0mm;
    SecondLength=0mm;
    }
    */
    /*
    fillet2 isa Fillet (select the cylindrical face of pad0 )
    {
    Radius =2.0 mm;
    }
    */
    }
    }
    }
  2. Remove the comments before the following lines and click Generate:
    pad0 isa Pad("S1")
    {
    FirstLength = 5.0mm;
    SecondLength=0mm;
    }

  3. Capture the fillet1 and fillet2 definitions, remove the comments and re-execute the script:

     import Input : FilePath "Select the PktInitialSketch.CATPart sample" ;

    calc isa CATPart
    {
    part1 isa Part
    {

    partbody isa BodyFeature
    {
    S1 isa Sketch.1 {}
    S2 isa Sketch.2 {}

    pad1 isa Pad("S2")
    {
    FirstLength = 0.5mm;
    SecondLength=2.0mm;
    }

    fillet1 isa ConstantEdgeFillet (capture the face using the Get surface command)
    {
    Radius =1.0 mm;
    }

    pattern1 isa Pattern[4,4] of fillet1
    {
    Step1 =7.0 mm;
    Step2 = 7.0 mm;
    }

    pad0 isa Pad("S1")
    {
    FirstLength = 5.0mm;
    SecondLength=0mm;
    }

    /*
    fillet2 isa ConstantEdgeFillet (capture the face using the Get surface command )
    {
    Radius =2.0 mm;
    }
    */
    }
    }
    }