美文网首页
2018-02-02

2018-02-02

作者: hothome99 | 来源:发表于2018-02-03 22:31 被阅读0次

    Creating Features from UDFs
    Method Introduced:
    •pfcSolid.Solid.CreateUDFGroup
    The method pfcSolid.Solid.CreateUDFGroup is used to create new features by retrieving and applying the contents of an existing UDF file. It is equivalent to the PTC Creo Parametric command Feature, Create, User Defined.

    To understand the following explanation of this method, you must have a good knowledge and understanding of the use of UDF’s in PTC Creo Parametric. PTC recommends that you read about UDF’s in the PTC Creo Parametric help, and practice defining and using UDF’s in PTC Creo Parametric before you attempt to use this method.

    When you create a UDF interactively, PTC Creo Parametric prompts you for the information it needs to fix the properties of the resulting features. When you create a UDF from J-Link, you can provide some or all of this information programmatically by filling several compact data classes that are inputs to the method pfcSolid.Solid.CreateUDFGroup.

    During the call to pfcSolid.Solid.CreateUDFGroup, PTC Creo Parametric prompts you for the following:
    • Information required by the UDF that was not provided in the input data structures.
    • Correct information to replace erroneous information
    Such prompts are a useful way of diagnosing errors when you develop your application. This also means that, in addition to creating UDF’s programmatically to provide automatic synthesis of model geometry, you can also use pfcSolid.Solid.CreateUDFGroup to create UDF’s semi-interactively. This can simplify the interactions needed to place a complex UDF making it easier for the user and less prone to error.

    Creating UDFs
    Creating a UDF requires the following information:
    • Name—The name of the UDF you are creating and the instance name if applicable.
    • Dependency—Specify if the UDF is independent of the UDF definition or is modified by the changers made to it.
    • Scale—How to scale the UDF relative to the placement model.
    • Variable Dimension—The new values of the variables dimensions and pattern parameters, those whose values can be modified each time the UDF is created.
    • Dimension Display—Whether to show or blank non-variable dimensions created within the UDF group.
    • References—The geometrical elements that the UDF needs in order to relate the features it contains to the existing models features. The elements correspond to the picks that PTC Creo Parametric prompts you for when you create a UDF interactively using the prompts defined when the UDF was created. You cannot select an embedded datum as the UDF reference.
    • Parts Intersection—When a UDF that is being created in an assembly contains features that modify the existing geometry you must define which parts are affected or intersected. You also need to know at what level in an assembly each intersection is going to be visible.
    • Orientations—When a UDF contains a feature with a direction that is defined in respect to a datum plane PTC Creo Parametric must know what direction the new feature will point to. When you create such a UDF interactively PTC Creo Parametric prompt you for this information with a flip arrow.
    • Quadrants—When a UDF contains a linearly placed feature that references two datum planes to define it’s location in the new model PTC Creo Parametric prompts you to pick the location of the new feature. This is determined by which side of each datum plane the feature must lie. This selection is referred to as the quadrant because the are four possible combinations for each linearly place feature.

    To pass all the above values to PTC Creo Parametric, J-Link uses a special class that prepares and sets all the options and passes them to PTC Creo Parametric. 

    相关文章

      网友评论

          本文标题:2018-02-02

          本文链接:https://www.haomeiwen.com/subject/mndezxtx.html