SolidWorks 2011 Parts Bible - Matt Lombard [193]
Creating Library Features
When you save library features to the library, they use the file extension *.sldlfp (library feature part). They must contain some base geometry, which simulates the part onto which the feature will be dropped. The base geometry is not transferred to the new part; only features that are marked with the “L” in the FeatureManager (for Library) are transferred to the new part. Figure 13.14 shows the FeatureManager of a library feature part.
FIGURE 13.14
The FeatureManager of a library feature part
Creating a library feature
When creating a library feature, the first problem that you need to solve is how the feature will be located on a new part. Does it need to be placed on cylindrical parts, rectangular parts, other types of shapes, or does this matter at all? Will the feature be located by using dimensions or sketch relations, or will it just be placed underdefined and later fully defined manually rather than automatically?
You may have noticed in one of the earlier examples that the sample fluid power ports had two versions of the same feature. One version is intended for the feature to be placed on the flat end of a cylinder, and the other version is intended for the feature to be placed on a rectangular face.
Understanding library limitations
Library features can contain multiple features of different types. They may add and remove material, even within a single library feature. However, a few limitations exist. For example, they require a base feature, and multi-body features and external references are not allowed, nor are surfaces, sheet metal, weldments, or molds-related features. In addition, you cannot add a scale feature (a feature that affects the entire body) to the library, nor can you apply library features to an assembly.
Creating a new library feature
To start a new feature, the first decision that you need to make is what shape to make the base. Is the feature a type that is usually going to go onto a single shape or multiple shapes? Regardless of your decision, you or whoever ends up using the feature will have the flexibility to change, or simply not use, the relations when you place the feature.
For this example, I use a rectangular base. The library feature that I want to create consists of two boss extrudes, a cut extrude, and several fillets. Here is how it works.
First, you need to create a rectangular extrusion. The size should be bigger than the feature that goes on it and representative of the face of the end part onto which this feature will typically be placed.
Next, in beginning to create the features that you want to reuse, it is very important that you pay attention to any references outside of the sketch; these include absolutely anything outside the active sketch, such as the sketch plane, references to edges, the Origin, other planes, other sketches, and axes. Although these references are allowed, each reference to anything that is not already part of the library feature must be reconnected when you place the feature on a new part. The ideal situation is obviously a single drag-and-drop, but generally speaking, at least one other step is usually needed. The initial drag-and-drop determines the face for the feature to start from, and from there, you usually need to locate features, either by using relations or dimensions. A concentric relation locates the feature in a single reference selection of a circular edge (although it may also need to be rotated), and dimensions typically require one dimension in the X dimension and another one in the Y dimension.
Figure 13.15 shows the base feature and the first feature of the library feature. The only relations between the sketch of the library feature