KweDftPackage (No NLS) Methods

You can retrieve an HlrView from a DrwView using the existing GetViewChildrenList.

This page discusses:

HlrView.AddClippingBox()

AddClippingBox lets you define a 3D clipping region in a view, focusing the display on a specific area of the mode.

Signature

HlrView.AddClippingBox(BoxDefinition : List, AutoUpdate : Boolean) : Boolean

Arguments

Name Input/Output Required? Type Comment
BoxDefinition In List The BoxDefinition list must contain 12 Real numbers representing the x, y, and z coordinates of four points in 3D space. The order must be:
  • x, y, z coordinates of the first base point.
  • x, y, z coordinates of the second base point.
  • x, y, z coordinates of the third base point.
  • x, y, z coordinates of the depth point.
AutoUpdate In Boolean (Optional)

If true, the view gets updated automatically. Defaults to true. If you don't want to update the view, you can pass false.

ReturnType

Boolean

Example

The following example is used to define a clipping box in a view, letting you focus on a specific area within the model:

let l(List)

// Retrieve HlrView from DrwView
View.GetViewChildrenList(l,"HlrView")

let hlr(HlrView)

for hlr inside l
{
          // Create a list to store the coordinates for the clipping box
	let in (List)
	in.Append(-26)
	in.Append(-105)
	in.Append(-105)
	
	in.Append(-26)
	in.Append(105)
	in.Append(-105)
	
	in.Append(-26)
	in.Append(-105)
	in.Append(105)
	
	in.Append(13)
	in.Append(-105)
	in.Append(-105)
	
        // Add the clipping box to the HlrView
       // By default, autoUpdate is true, if we don't want view update then we can pass false
	
            hlr->AddClippingBox(in)
	Notify ("Clipping box added to the view")
}

HlrView.AddClippingWithCircle()

You can add a circular clipping to an HlrView. This function is used for focusing on specific circular areas.

Signature

HlrView.AddClippingWithCircle(XCenter : Real, YCenter : Real, Radius : Real, IsA3DClipping : Boolean, AutoUpdate : Boolean]) : Boolean

Arguments

Name Input/Output Required? Type Comment
XCenter In Real -
YCenter In Real -
Radius In Real -
IsA3DClipping In Boolean -
AutoUpdate In Boolean -

ReturnType

Boolean

Example

The following example is used to add a circular clipping to an HlrView:

let l(List)

// Retrieve HlrView from DrwView
View.GetViewChildrenList(l,"HlrView")

let hlr(HlrView)
let XCenter,YCenter,Radius(Real)
let ComputeMode(Boolean)

XCenter = 50
YCenter = 20
Radius = 70
ComputeMode = true

for hlr inside l
{
             // Add the clipping with circle to the HlrView
            // By default, autoUpdate is true, if we don't want view update then we can pass false
	hlr->AddClippingWithCircle(XCenter,YCenter,Radius,ComputeMode)
	Notify ("Clipping box with circle is added to the view")
}

HlrView.AddClippingWithProfile()

You can add a polygonal clipping to an HlrView. This method is used for defining a clipped area based on a set of points that form a polygon.

Signature

HlrView.AddClippingWithProfile(profil : List, IsA3DClipping : Boolean, AutoUpdate : Boolean]) : Boolean

Arguments

Name Input/Output Required? Type Comment
profile In List

The profile parameter defines a closed 2D polygon that represents the clipping.

The list contains a flat sequence of real numbers, where each consecutive pair represents the x and y coordinates of a vertex: [x1, y1, x2, y2, x3, y3, ..., xn, yn]. Each (xi, yi) pair defines one vertex of the profile. At least three distinct vertices are required.

IsA3DClipping In Boolean If true; the exact mode to create a 3D clipping view. If false quick mode to create a quick clipping view.
AutoUpdate In Boolean (Optional) If true, the view gets updated automatically. Defaults to true. If you don't want to update the view, you can pass false.

ReturnType

Boolean

Example

The following example is used to add a polygonal clipping to an HlrView:

let l(List)

// Retrieve HlrView from DrwView
View.GetViewChildrenList(l,"HlrView")

let hlr(HlrView)
for hlr inside l
{
	// (10, 10)
in.Append(10)
in.Append(10)

// (10, 70)
in.Append(10)
in.Append(70)

// (40, 70)
in.Append(40)
in.Append(70)

// (40, 10)
in.Append(40)
in.Append(10)


              // Add the clipping profile to the HlrView
             // By default, autoUpdate is true, if we don't want view update then we can pass false
	hlr->AddClippingWithProfile(in,true)
	Notify ("Clipping box with profile added to the view")
}

HlrView.DrwItemList()

This method retrieves generated items (list of CATEarlyGenItem) from the HlrView object.

Signature

HlrView.DrwItemList() : List

ReturnType

List

HlrView.ForceUpdate()

You can force the update of the HlrView even if not required.

Signature

HlrView.ForceUpdate() : Boolean

ReturnType

Boolean

Example

The following example is used to force the update of the HlrView:

let l(List)

// Retrieve HlrView from DrwView
View.GetViewChildrenList(l,"HlrView")

let hlr(HlrView)
for hlr inside l
{
            // Forces the Update of the generative view even if not necessary.
	hlr->ForceUpdate()
	Notify ("View has been updated from EKL script")
}

HlrView.ModifyProjectionPlane()

ModifyProjectionPlane specifies the view’s projection plane, defining its direction.

Signature

HlrView.ModifyProjectionPlane(X1Direction : Real, Y1Direction : Real, Z1Direction : Real, X2Direction : Real, Y2Direction : Real, Z2Direction : Real) : Boolean

Arguments

Name Input/Output Required? Type Comment
X1Direction In Real -
Y1Direction In Real -
Z1Direction In Real -
X2Direction In Real -
Y2Direction In Real -
Z2Direction In Real -

ReturnType

Boolean

Example

This example modifies the projection plane of the hlr view to the YZ plane, which is the plane defined with the vectors (0 1, 0) and (0, 0, 1).

let l(List)

// Retrieve HlrView from DrwView
View.GetViewChildrenList(l,"HlrView")
Notify ("Size of children list retrieved = ",l.Size())

let hlr(HlrView)

for hlr inside l
{
	hlr->ModifyProjectionPlane(0,1,0,0,0,1)
	hlr->ForceUpdate()
}

HlrView.ShapeList()

This method retrieves the generated shapes (list of CATEarlyGenShape) from the HlrView object.

Signature

HlrView.ShapeList() : List

ReturnType

List

DrwView.CreateDrwAreaFill()

This method creates a DrwAreaFill from:

  • 1 external contour (2D point coordinates)
  • 0 to N internal contours (2D point coordinates)

The contour points that are provided in the following sequence:

  1. The points for the external contour
  2. The points for the (optional) internal contours

The ContourPointsNb list must contain the number of points of each contour in the same order as the contour points:

  1. The number of points of the external contour
  2. The number of points of each (optional) internal contour

Signature

DrwView.CreateDrwAreaFill(ContourPointsXList: List, ContourPointsYList: List, ContourPointsNb: List, AreaFill: DrwAreaFill ): Boolean

Arguments

Name Input/Output Required? Type Comment
ContourPointsXList In List Lists the X coordinate of the contour points.
ContourPointsYList In List Lists the Y coordinate of the contour points.
ContourPointsNb In List Lists the number of points of each contour.
AreaFill Out DrwAreaFill Creates the DrwAreaFill object

ReturnType

Boolean.

HlrView.UnsetGVSName()

You can use the UnsetGVSName to manage GVS names.

Signature

HlrView.UnsetGVSName() : Boolean

ReturnType

Boolean

Example

The following example removes the Generative View Styles (GVS) associated with the HLRview:

let l(List)

// Retrieve HlrView from DrwView
View.GetViewChildrenList(l,"HlrView")

let hlr(HlrView)

for hlr inside l
{
	hlr->UnsetGVSName()
	Notify ("GVS Removed from the view")
	hlr->ForceUpdate()
}