Please enable JavaScript to view this site.

Knowledge Bridge Documentation

Help version: 3.3.8

 

Layer Support in kBridge

Like the same-named feature in CAD systems, layers allow selective showing and hiding of individual objects independent of the other visibility-controlling parameters.  Because there are many other ways to control visibility, layers are often not the best choice, except in the following situations:

1.You need to export or import a model to/from an external system which uses layers.

2.You need to control content in a drawing in a viewport-specific way.

 

Outside of these cases, you should use the show parameter, or use material/color and object existence to control whether an object appears in a rendered image or not.

 

Use Case: Parts Drawings Extracted from Assemblies

A major use for Layers is to make part drawings—that is, to extract a part from an assembly. For example, if you have an assembly of 4 parts, you might want to make a drawing of each one, then provide a drawing of the complete assembly. The only practical way to do this is layers.  

 

You do this by placing each part on a separate layer, and make a drawing that shows only the geometry on that layer. The dimensions are in the drawing (scene) so you don't need to put them on a layer. But you otherwise have no way to hide all the geometry for the other parts in a single-part drawing.

 

The major advantage in the kBridge implementation of layers is that they are rules-driven, not just one more visualization switch on a CAD rendering. In the above example, you might create rules based on the technical proficiency of an end-user. For the same model, you could supply a highly technical end-user with a great deal of visual detail and show a much simpler overall view to a non-technical end-user.

 

How Layers Work

Each object which can be rendered has a new string Parameter called layer.

 

This Parameter defines which layer “contains” the object. An object can exist on only one layer at a time, but as we said, layers can be controlled by rules, and thus an object’s layer can be changed depending on any conditions you choose.

 

Naming

A layer name can be any string of characters, and may include spaces and some special characters.

 

The following characters cannot be included: leading double underscore “__”, comma “,”, colon “:”, and period “.”.  However, before you go wild with special characters, be sure the ones you choose will be accepted on the external system(s) you might be transferring to.

 

In addition, kBridge layers are not case-sensitive, so “TITLE BLOCK” is the same as “Title Block”.

 

Declaring

You don’t have to declare layers. As soon as you supply a layer name, it “exists” and can be used. There is no limit to the number of layers you can create, though there might be limitations on an external system.

 

By itself, membership in a layer means nothing. A layer's visibility or lack thereof is a function of the Camera that is displaying the image.

 

Turning Layers On and Off: New Camera Parameters

Camera now has two new Parameters, includeLayers and excludeLayers. These together define the layer combination that the camera will show.

 

Layer names in includeLayers will be included, and layer names in excludeLayers will be excluded. If the same name appears in both, exclude wins, so the layer will not be visible.

 

The special layer name “__all” (note use of double underscore, which is reserved) means “all layers”. There is no fixed definition of all layers.  Because layers can be changed at any time, the set of layers between rule updates could vary greatly.

 

The default expression for includeLayers is [“__all”].  The default expression for excludeLayers is [].  So if you just want to show a few layers, you can them in the include list, or if you just want to hide a layer, you can put it in the exclude list. The default behavior is to show all layers.

 

Other Considerations for Layers

A Scene has a Camera, as well as Viewport. These are the only built-in ways to use the layer rule. Just as for anything else in a Scene, if you want to control the layers in the default “model” scene, you need to create a scene called “model” and customize its parameters as you see fit.

 

Note that layers don’t override any other viewability aspects. All of the existing ways to hide or show things still work. In a sense, layers come last in deciding whether something will be shown or not.

 

Layers do not affect geometry; bounding boxes, for example, are still there. In fact, the geometry is still there, in the modeling sense.  You just can’t see it if the layer isn’t on the camera’s list.

 

User Interface

There is no UI for Layers; layer support is all rule-based.  

Knowledge Bridge from Engingeering Intent is a full-featured engineering and sales automation environment