Vous êtes sur la page 1sur 12

ProfilesMagazine.

com

Creating Pro/ENGINEER Geometry with User Defined Features


by Ronald Grabau, HP
User Defined Features or UDFs provide a fast, flexible, and accurate way to reproduce Pro/ENGINEER geometry. When you define a UDF, a .gph file is created that contains all the information necessary to copy the desired geometry. UDFs can be made of any Pro/ENGINEER geometry, including assembly features and component assembly. By using the UDF instead of manually placing the geometry, you also assure better productivity and consistency.

Figure 1

Creating the Geometry


The first step is to create the geometry you want to copy. There is no real magic here but there are a few useful tips to get you started in the right direction. Reference control is a must. The two basic rules when creating your geometry are that the UDF (1) needs to prompt for all references used, and (2) recognizes if a parent is used multiple times. Create a simplified model of all the geometry. Create a point or axis before you start creating the geometry that will be in the UDF. Use this feature as the primary reference for all features that go into the UDF. Delete all references from the sketch. Add the locating point or axis as a reference and use centerlines for horizontal and vertical references. Consider how these features will be used in other parts. Will they always be on a flat plane? What references will be required? Will a hole work better than a cut? The features you use may determine how robust your UDF is. No reference prompt is necessary when you are referencing geometry that is within the UDF definition. When scaling geometry is an option, model the geometry so that there is a primary dimension with a value of 1. This makes scaling factors easy. Driving geometry with parameters and relations should be no problem. For relations that use parameters, use feature relations. An extra regeneration after placing the UDF will be required for feature relations. Relations don't work if you use dimensions that are not part of the UDF geometry. Resize datum planes if they are included with the UDF. A hidden datum will not remain hidden after the UDF placement.

Creating the UDF


Its important to start with a clear understanding of what you want to achieve. I recommend creating a short checklist so that you will know what options you want to use. Here are some examples from my own checklist. What am I trying to accomplish?
http://www.profilesmagazine.com/p30/grabau.html[11/19/2009 3:19:52 PM]

ProfilesMagazine.com

How will the geometry vary (specific sizes, infinite sized, predefined or user-defined dimensions)? What are the driving features? Is my geometry created correctly to get the desired results? What references are going to be required?

The UDF creation option is found under Tools>UDF Library>Create. To begin the process, you must define the following series of required and optional features.

Required Features
UDF Name. The first prompt will be for the UDF name. This name will be appended with the .gph extension. UDF Options. These options ask if you want a reference model. The reference model will be used when you are placing the UDF. Any references will be highlighted in this model, clarifying what is being asked for in the reference prompt. The options are: Stand Alone The reference model is optional (answer Yes or No). If a reference model is used, the current model will be copied. You also have an option to display the reference model or not when the UDF is used. If a reference model is not used, there will be no prompt for one. Subordinate The current model is used for the reference model. The reference model is always displayed when placing the UDF. Tip: I recommend the subordinate option. The reason is that if you ever need to make changes to the UDF geometry, a reference model will be required. If you dont have one, you may be forced to start the UDF creation from scratch.

Figure 2

Adding the Geometry to the UDF. During this prompt, you will add the geometry to the UDF. Here are my suggestions:

http://www.profilesmagazine.com/p30/grabau.html[11/19/2009 3:19:52 PM]

ProfilesMagazine.com

Choose only the features that make up the desired geometry. Do not select reference or parent geometry. Use any normal selection method (Pick from Model, Pick from Model Tree, By Layer, Range). Reference Prompts. After picking all your geometry, you now need to enter prompts for all the references. Remember I mentioned that minimizing references is important? Well, this is where you find out how good a job youve done. Most of my UDFs have three to four promptstypically a sketch plane, an orientation plane, and a location prompt. Tip: I can tell you from experience that having too many prompts makes the UDF more confusing than useful. If you have too many prompts, try changing the geometry to reduce references.

Figure 3

Every reference needs a textual prompt. Prompts appear in the message window. A good prompt directs the user to select the correct reference. Be clear and concise. Long descriptions may confuse more than help. Be consistent in your wording. Pro/ENGINEER automatically adds the text Select as the first word to the message prompt. When a reference is used more than once, you have two options on how to proceed: (1) Singleyou will be prompted only once for the reference, or (2) Multipleyou will have to select the reference every time it is needed. Tip: I generally recommend a single prompt.

Figure 4

At the end of the prompts, you can cycle back and make changes before proceeding.

Options for Adding Variables


Variable Elements. This option lets you edit the definition of a feature when the UDF is placed. All you need to do is select the feature that will vary. When this feature is created by the UDF, the user is automatically placed into the feature definition where changes can be made. Variable Dimensions. If you pick a dimension from the features in the UDF, a prompt for that dimension will be required and the user will input a value when placing the UDF. Dim Values. This allows you to edit any existing values in the reference part. Use this if you find that the current size or shape is incorrect and you want to change it without exiting the UDF definition. Units. With this option you can change the base units of the UDF the same way you would change the units of a part. Having the correct units can avoid some extra steps when placing the UDF. If the units between the UDF and

http://www.profilesmagazine.com/p30/grabau.html[11/19/2009 3:19:52 PM]

ProfilesMagazine.com

receiving model differ, there is a placement option to correct this. Ext Symbols. This option lets you assign parameters used in relations to parameters in the receiving part. Family Tables. Like normal family tables, this option provides a method for adding variable dimensions and features. Note that: There is no verification of instances. Unique instance names between different UDFs are not required. Placed geometry is not an instance. No family table relationships exist after the geometry is created. Tip: Layers and surface colors do not transfer when you use a UDF.

Figure 5

Using the UDF


Now its time to choose the options as you place the UDF. To place a UDF, go to Insert>User Defined Feature. Reference Model. In the definition, you had an option for Stand Alone or Subordinate. If you used Stand Alone but said yes to the reference model, the first prompt will ask if you want the reference part. Yes brings the reference part up in a sub window, No moves you to the next option without a reference model. The reference model pops up within a sub-window.

http://www.profilesmagazine.com/p30/grabau.html[11/19/2009 3:19:52 PM]

ProfilesMagazine.com

Figure 6 Placement OPTS. You have two choices: Independent places the UDF geometry in the current model just as if you created all the geometry manually. Dimensions for features can be Normal, Read Only, or Blanked. UDF Driven geometry placed with this option will be driven by the UDF. This means you must make modifications to the UDF to change the geometry. Changing the UDF changes all geometry in all models using this option.. Dimensions can be Read Only or Blanked. Tip: I recommend Independent. This allows individual changes to the geometry and avoids dependency to the UDF. If you have a dependency to a UDF, all instances of that UDF will be modified when you change the UDF.

Scale. This next prompt is for scaling options. With these options, it doesnt matter if your UDF has the same units as the receiving part. If the UDF and part are the same units, the Same Size option will not be available. Same Size converts geometry to a different unit without changing the size of the geometry (1 inch becomes 25.4 mm). Sam Dims uses the current dimensions or converts the current dimensions to a different unit (1 inch becomes 1 mm). User Scale scales the geometry by a user input value.

Dimension Display Options. Display options apply rules to dimensions that have not been designated as variable. Here are the choices: Normal shows all dimensions and allows modifications. Use this option when you may need to change some geometry later. Read Only lets you see but not modify the dimensions. This is a good choice for documentation. Blank doesnt let you see or change any dimensions. Choose this option for company logos or features that you dont want modified.

http://www.profilesmagazine.com/p30/grabau.html[11/19/2009 3:19:52 PM]

ProfilesMagazine.com

Figure 7

Selecting Your References. For the features that require references, you will be prompted for the new references. This is where the reference model comes in handy. For each prompt, the reference model highlights what was used on the original model. The message prompts you typed in for each reference will be displayed in the message window. Directional Arrows. Directional arrows are only displayed if the orientation of a feature is ambiguous. (This happens when you use datums for orientation because there are two sides to each datum.) Changing the arrow direction changes the orientation of the feature(s).

Figure 8

Finalizing the UDF


Before you finish your UDF, you can use the Group Placement menu to change many of the options. This way, you dont have to start all over if you made a mistake. When redefining, you have the following subset of options: Scale lets you redo the scaling options. Var Dims lets you change an incorrect value. Dim Display lets you reset the display of non-variable dimensions. References lets you redo the references. Reference Action lets you flip the directional arrows.

http://www.profilesmagazine.com/p30/grabau.html[11/19/2009 3:19:52 PM]

ProfilesMagazine.com

Figure 9-1

Figure 9-2

Examples of User Defined Features


Most of my UDFs fall into one of three general categoriesStandard, Variable Dimension, and Scalable. These categories help me understand some of the requirements for my checklist. Here are simple examples of each type. 1. Standard UDF: Staking Feature Standard UDFs are those that just copy the features and have no special requirements or options. They may, however, contain a UDF family table. In this example, the UDF only has two features but is used a lot and has standard dimensions to meet a company specification.

Feature Creation Base feature is the square protrusion. This is not part of the UDF. Axis is placed in the middle of the part and used as the locating reference. A protrusion is placed using the axis and top surface. A coaxial hole is created using the placement axis and the same surface as the form placement. The hole definition is a two-sided hole using the To Next depth option. UDF Creation Subordinate (will have reference model) Two features (protrusion for cylinder and hole) Prompt: Select locating axis Prompt: Select surface for protrusion Family table (allows users to pick predetermined heights)

http://www.profilesmagazine.com/p30/grabau.html[11/19/2009 3:19:52 PM]

ProfilesMagazine.com

2. Variable Dimension UDF: Snap Feature A Variable Dimension UDF is the same as the standard except that you have to enter selected dimension values. In this example, the snap feature varies only in height.

Feature Creation Base feature is the square protrusion and datum point for feature location.

http://www.profilesmagazine.com/p30/grabau.html[11/19/2009 3:19:52 PM]

ProfilesMagazine.com

The first feature for the UDF is the rectangle protrusion. Since the snap may go on non-planar surfaces, I made a datum plane offset a height from the point and then used the To Next depth option.

The rest of the features are created referencing only the rectangle protrusion or locating point.

UDF Creation Subordinate (will have reference model) Six features Variable dimension is the offset datum plane dimension Prompt: Select locating point Prompt: Select sketch plane reference (plane that the snap will be normal to) Prompt: Select sketch plane orientation Prompt: Enter snap height

UDF Placement

http://www.profilesmagazine.com/p30/grabau.html[11/19/2009 3:19:52 PM]

ProfilesMagazine.com

The user is prompted for three references and one value input. The PNT0 is used for the locating point, the Top Datum plane for the sketch plane references, and the front of the part for the sketch plane orientation. Since a datum plane is used for the sketch plane reference, the reference direction must be specified. In this case, the arrow is pointing in the direction we want the snap to be built.

The finished snap takes only seconds to create.

3. Scalable UDF: Company Logo A Scalable UDF applies a user-defined scale to the geometry. This is a good solution for a company logo, which has infinite sizes and geometry that is too complex to just modify the dimensions. Feature Creation Note the dimensions. To allow easy scaling, the entire logo is scaled so that the width dimension is 1.

http://www.profilesmagazine.com/p30/grabau.html[11/19/2009 3:19:52 PM]

ProfilesMagazine.com

The two centerlines are aligned with the locating point. Since the geometry is placed on any type of surface, I used the Offset feature. UDF Creation Just create a standard UDF. UDF Placement When asked for the scale, use the User Scale option. Enter the size of the logo as desired. For the Dim Display, I use Blank since there is no good reason to display the dimensions. When you get to the preview, see if the geometry is correct. If the logo is backwards, use Redefine to change the references or the Regen Action.

Figure 20-1

Figure 20-2

Once everything is set, finish the feature creation. Again, an otherwise difficult task for most Pro/ENGINEER users takes only seconds with a UDF.

http://www.profilesmagazine.com/p30/grabau.html[11/19/2009 3:19:52 PM]

ProfilesMagazine.com

Conclusions
While User Defined Features are not the only method for copying or creating geometry in Pro/ENGINEER, they do provide capabilities that are not found in other options. Where repeatability, consistency in modeling and efficiency are important, consider using a UDF. Heres a quick recap of benefits. Enables users to copy features from one model to another. Offers options not found in other top-down design tools, including: Prompts Family tables Relation copy User input Parameter selection Scalability Generates productivity gains: Commonly used features are easily created Creation methods are consistent Can be used as start geometry and modified as necessary Assures correct geometry Geometry is created quickly and accurately by new as well as experienced users.

http://www.profilesmagazine.com/p30/grabau.html[11/19/2009 3:19:52 PM]

Vous aimerez peut-être aussi