PowerCopy相关概念及接口函数

来源:互联网 发布:淘宝怎么看历史最低价 编辑:程序博客网 时间:2024/04/28 12:41

Definitions

What is a "Component"?

A component is a feature that is used to form the User Feature (or the Power Copy) reference. This feature can be:

  • A geometrical feature
  • A knowledge object (Rules, Formulas, Design Table, Check)
  • A constraint
  • Another User Feature
  • A surfacic set ( Ordered Geometrical Set or Geometrical Set)
  • A Body (not the PartBody) 

A User Feature (or a Power Copy) can be made up of any number of components. These components must be selected from the same Part document as the one containing the User Feature or the Power Copy reference.

What are the "KnowledgeTemplates" Set and the "PowerCopy" Set?

User Features and Power Copies that are used to be instantiated are called User Feature references and Power Copy references respectively.

The "KnowledgeTemplates" and "PowerCopy" sets aggregate User Feature references and Power Copy references respectively. These two sets are non mechanical features aggregated in the MechanicalPart feature

What is an "Input"?

An input is a feature that is not directly selected to form the User Feature or the Power Copy, but this feature is pointed at through an external link by a component that is part of the UserFeature or Power Copy. Inputs must be valuated at the time of instantiation.

For example, let's look at the inputs of the User Feature reference created in the use case "Creating a User Feature Reference" [5]


This feature has only one component, a Geometrical Set (the green box). It contains a loft, Loft.2, defined by two circles, Circle.3 and Circle.4. These circles are placed on two planes, Plane.1 andPlane.2. These two planes are perpendicular to a line, Line.2, at each of its end points. These end points, Point.1 and Point.2, are not inside the group of features defining the components. So these two points are the "inputs".

What is a "Published Parameter"?

The feature can have knowledge parameters which can be published or not. Refer to the CATIParmPublisher interface of the KnowledgeInterfaces Framework. The parameters of the User Feature (or the Power Copy) are made up of the set of all knowledge parameters of its components. Among these parameters, you can select (publish) those whose values are likely to be modified during the instantiation step.

Let's take the same example that was shown in the What is an "Input"? section:

The User Feature reference contains only one component, a Geometrical Set (the green box) and it contains several features: Line.2, Circle.3, Circle.4, Plane.1... In Fig.2 we have only presented the parameters for Line.2 (L. from the start point, L. from the end point), Circle.3 (Radius) and Circle.4 (Radius). These two last radius parameters are outside the green box because they have been "published".

The published parameters appear in the specification tree only for the User Feature; they can be found in the UserFeatures set and under each instance.

What is a "Role"?

For each input and published parameter you can give an "external" name. This external name is the "role". The default role of an input is the name of the feature and the default role of a parameter is its default name. For example, in the case of a parameter, it is easier to understand "The Radius of the Top Circle" rather than "Radius".

For the input, the role has an extra significance: the role is useful to give more meaning to the end user, but it can also be used to automatically look for inputs. To valuate the inputs at each instantiation, you can specifically set a feature for each input, but you can also use the "Use Identical Name" function. This means that the process tries to valuate an input by looking for a feature whose name returned throughCATIAlias is identical to the role name of the input.

What is a "Type"?

The type is a User Feature notion, there is no type for a Power Copy. The type is a string whose recommended naming rule is the following: the first part is the company prefix and the second part is dependent of the current user feature. There is two advantages to associate with a User Feature reference a type:

  • Implement the CATIEdit interface on the type to customize the edition panel. Refer to the use case "CATIEdit for a User Feature" [9] for an example.
  • Benefit from the Search

You can create a type by code using the CATIUdfFeatureUser interface or during the interactive creation. In the two cases, once the type is created, if instances already exist, don't change the type.

  • CATIUdfFeatureUser
    • SetType enables to create a type on the User Feature reference.
    • GetType retrieves the type.

      This interface is available on a User Feature reference and on the instances, but if the GetType method can be used on the two cases, the first method must be only used for the User Feature reference.

  • "User Feature Creation" command

    In this interactive command, click the Type tab. The following dialog appears:


    • In the Super Type field, click the Auto button. SkinFeature is displayed in the Super Type field. Note that the Super Type is automatically displayed by the application. The Super Type can be MechanicalFeature or SkinFeature.
    • In the Type1 field, enter the name of the type that you want to assign to the User Defined Feature (CAAUdfLoft in the example) and click Generate. You can notice that you retrieve the naming recommendation: the company prefix at the beginning and a specific name at the end.