HlrView.AddClippingBox()
AddClippingBox lets you define a 3D clipping region in a view,
focusing the display on a specific area of the
mode.
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.
|
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.
Arguments
| Name |
Input/Output |
Required? |
Type |
Comment |
XCenter |
In |
|
Real |
-
|
YCenter |
In |
|
Real |
-
|
Radius |
In |
|
Real |
-
|
IsA3DClipping |
In |
|
Boolean |
-
|
AutoUpdate |
In |
|
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.
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. |
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
HlrView.ForceUpdate()
You can force the update of the HlrView even if not
required.
Signature
HlrView.ForceUpdate() : 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.GetLinks()
Returns
a list of subproduct names associated with the view, allowing you to identify and manage
update or modification dependencies.
Signature
HlrView.GetLinks(PointedElements : List) : Boolean
Arguments
| Name |
Input/Output |
Required? |
Type |
Comment |
PointedElements |
Out |
|
List |
-
|
ReturnType
Boolean
Returns
a Boolean value indicating whether the operation succeeds (true) or fails (false).
Example
let l(List)
View.GetViewChildrenList(l,"HlrView")
// Retrieve HlrView from DrwView
let hlr(HlrView)
for hlr inside l
{
// List to store the Product Name (Instance Title)
let ProductNames(List)
hlr->GetLinks(ProductNames)
let str (String)
for str inside ProductNames
{
Notify(str)
}
}
Note:
Product Instance Hierarchy:
Root
├─ SubProduct1
├─ SubProduct2
└─ SubProduct3
└── SubProduct3.1
└── SubProduct3.2
└── SubProduct3.3
Each node represents a Product Instance Title, and child instances are nested under
their respective parent instances.
HlrView.GetNumberOfLinks()
The GetNumberOfLinks method is used to return the number of
view links of the HlrView.
Arguments
| Name |
Input/Output |
Required? |
Type |
Comment |
oNbViewLinks |
Out |
|
Integer |
-
|
Example
The following example is used to return the number of view links of the
HlrView:
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
{
let NumberOfLinks(Integer)
hlr->GetNumberOfLinks(NumberOfLinks)
Notify ("NumberOfLinks = ",NumberOfLinks)
}
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 |
-
|
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.PutLinks()
You
can apply links to an HlrView by replacing existing links, enabling
associations between elements in the generative view.
Arguments
| Name |
Input/Output |
Required? |
Type |
Comment |
PointedElements |
In |
|
List |
-
|
Append |
In |
|
Boolean |
-
|
ReturnType
Boolean
Returns
a Boolean value indicating whether the operation succeeds (true) or fails (false).
Example
let l(List)
View.GetViewChildrenList(l,"HlrView")
// Retrieve HlrView from DrwView
let hlr(HlrView)
for hlr inside l
{
// List to store the Product Name (Instance Title)
let iProductNames(List)
// Append the products to the list
// iProductNames.Append("SubProduct1")
iProductNames.Append("SubProduct3\SubProduct3.1\SubProduct3.2\SubProduct3.3")
hlr->PutLinks(iProductNames)
hlr->ForceUpdate()
}
HlrView.RemoveLink()
RemoveLink deletes an existing link from the
HlrView. Before removing it, use
GetNumberOfLinks to ensure that links are available and avoid errors.
Arguments
| Name |
Input/Output |
Required? |
Type |
Comment |
IndexLink |
In |
|
Integer |
-
|
Example
The following example is used to remove the second link from the
HlrView:
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->RemoveLink(2)
hlr->ForceUpdate()
}
HlrView.ShapeList()
This
method retrieves the generated shapes (list of CATEarlyGenShape) from the
HlrView object.
Signature
HlrView.ShapeList() : 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:
- The points for the external contour
- 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:
- The number of points of the external contour
- 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 |
HlrView.UnsetGVSName()
You
can use the UnsetGVSName to manage GVS names.
Signature
HlrView.UnsetGVSName() : 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()
}
|