Description This data structure defines the information needed to retrieve, modify, or add an Acceptance Filter specification to/from a source node. Acceptance Filter regions are located by first shifting the region to the position (centerX0, centerY0, centerZ0) in the coordinate system of the coordSysNode parameter to establish a new local coordinate system of the Acceptance Filter region. The X rotation angle is then applied in the region’s local coordinate system. The Y rotation angle is then applied in the current Acceptance Filter region’s local coordinate system. The Z rotation angle is then applied in the current Acceptance Filter region’s local coordinate system. This sequence of operations is equivalent to an initial shift in the coordSysNode parameter’s coordinate system followed by individual RotateX, RotateY and RotateZ operations that are each in the “self” coordinate system of the Acceptance Filter region.
Definition Type T_ACCEPTANCE_FILTER isActive As Boolean isRender As Boolean acceptType As String shape As String semiApeX As Double semiApeY As Double centerX0 As Double centerY0 As Double centerZ0 As Double rotAngleX As Double rotAngleY As Double rotAngleZ As Double coordSysNode As Long
Parameters isActive As Boolean This parameter sets the active state of the Acceptance Filter region. When True, the Acceptance Filter region will be applied during ray creation. When False, the Acceptance Filter region will be ignored during ray creation.
isRender As Boolean This parameter sets the draw flag of the Acceptance Filter region. When True, the boundary curve of the Acceptance Filter region will be drawn in the 3D view. When False, the boundary curve of the Acceptance Filter region will not be drawn in the 3D view. The draw color of the boundary curve is automatically chosen by FRED.
acceptType As String This parameter determines how the Acceptance Filter region success criteria is determined. Options are: “inside” – rays generated inside of the region meet the filter requirement “outside” – rays generated outside of the region meet the filter requirement
shape As String This parameter determines the shape of the Acceptance Filter region. Options are “ellipse” and “rectangle”.
semiApeX As Double This parameter determines the semi aperture of the Acceptance Filter region in the X direction.
semiApeY As Double This parameter determines the semi aperture of the Acceptance Filter region in the Y direction.
centerX0 As Double This parameter specifies the X position of the Acceptance Filter region center in the coordinate system of the coordSysNode parameter.
centerY0 As Double This parameter specifies the Y position of the Acceptance Filter region center in the coordinate system of the coordSysNode parameter.
centerZ0 As Double This parameter specifies the Z position of the Acceptance Filter region center in the coordinate system of the coordSysNode parameter.
rotAngleX As Double This parameter specifies the rotation angle about the local X axis of the Acceptance Filter region.
rotAngleY As Double This parameter specifies the rotation angle about the local Y axis of the Acceptance Filter region.
rotAngleZ As Double This parameter specifies the rotation angle about the local Z axis of the Acceptance Filter region.
coordSysNode As Long This parameter specifies the node number of the object whose coordinate system is used for positioning the Acceptance Filter region.
Example The example below shows how to prepare a T_ACCEPTANCE_FILTER data structure and then use the structure to add a new Acceptance Filter region to an existing source. Sub Main
'Source we want to modify Dim srcNode As Long srcNode = FindFullName( "Optical Sources.Source 1" )
'Define the Acceptance Filter Dim tFilt As T_ACCEPTANCE_FILTER tFilt.isActive = True tFilt.isRender = True tFilt.acceptType = "inside" tFilt.shape = "rectangle" tFilt.semiApeX = 2.5 tFilt.semiApeY = 5.0 tFilt.centerX0 = 0.0 tFilt.centerY0 = 5.0 tFilt.centerZ0 = 15.0 tFilt.rotAngleX = 45 tFilt.rotAngleY = 15.0 tFilt.rotAngleZ = 45.0 tFilt.coordSysNode = FindFullName( "Geometry.Plane.Surface" )
'Add the acceptance filter Dim nFilt As Long nFilt = AddSrcAcceptanceRegion( srcNode, tFilt )
'Update the model Update
End Sub
See Also Sources Acceptance Filter Script Commands
|