About Knowledgeware Parameters

The camera shows you how to control camera parameters using Knowledgeware tools. This enables you to link parameters to constraints like formulas in order to, for instance, automatically update the camera position whenever the object is moved.

Open the Lamp.CATProduct document.

  1. Create a camera by clicking Create Camera . The camera is created at the current viewpoint:

    You can refer to Creating a Camera for detailed information on cameras.
  2. Make sure that the camera is selected either in the geometry area or in the specification tree then click Formula in the Knowledge toolbar to open the Formulas dialog box:

    The Parameter list displays the parameters related to the camera:
    • KweType: controls the lens type of the camera. This parameter is an integer and you can choose between "0" for perspective or "1" for parallel. The default value is "0"
    • KweViewAngle: controls the view angle of the camera. The default value is "15°"
    • KweFocus: controls the focal length (i.e. the field of view) for perspective cameras. The default value is "420mm"
    • KweZoom: controls the zoom factor (i.e. the field of view) for parallel cameras. The default value is "1"
    • KweVisuMode: controls the representation of the camera, i.e. whether the camera is displayed in the geometry area or not. The default value is "1" which means that the camera is displayed
    • KweUpdateFromView: controls the update mode of the camera. You can choose between "0" to indicate that the camera should not be updated when the viewpoint is modified and "1" to indicate that the camera should be updated. The default value is "0"
    • KweOriginX: controls the position of the camera origin along the X axis (in mm)
    • KweOriginY: controls the position of the camera origin along the Y axis (in mm)
    • KweOriginZ: controls the position of the camera origin along the Z axis (in mm)
    • KweTargetX: controls the position of the camera target along the X axis (in mm)
    • KweTargetY: controls the position of the camera target along the Y axis (in mm)
    • KweTargetZ: controls the position of the camera target along the Z axis (in mm)
    • KweZenithX: controls the rotation of the camera around the X axis
    • KweZenithY: controls the rotation of the camera around the Y axis
    • KweZenithZ: controls the rotation of the camera around the Z axis.
  3. To edit a parameter, select it from the list: the selected parameter appears in the Edit name of the value of the current parameter box along with the corresponding value in the box to the right.

    In this scenario, we select KweUpdateFromView:

  4. Enter the "1" in the box displayed to the right to indicate that the camera should be updated according to the viewpoint.

    For detailed information on how to use the other boxes available from this dialog box, refer to Getting Familiar With the f(x) Dialog Box.
  5. Click OK or Apply + OK to validate and close the dialog box.

    The parameter is modified.

  6. Modify the viewpoint (by rotating the object, for instance) and check the result: the camera is updated accordingly as shown below:

    Camera with original viewpoint  Camera after viewpoint modification
 

You can also create formulas to constrain the parameters of your choice. For instance, you could associate the center of a part to the camera target so that the camera position changes according to the the object position.
For detailed information on how to create and use formulas, refer to the "Formulas" section in the Version 5 - Infrastructure User's Guide.