Professional Documents
Culture Documents
!this.aidGratingBox()
2
endmethod
!this.aidGratingBox()
endif
endmethod
!this.aidGratingBox()
endmethod
-- Aid Box
AID CLEAR ALL $!<this.aidNumGrating>
AID TRANSLUCENCY 25
AID BOX NUMBER $!<this.aidNumGrating> AT $!<boxPos>
ORIENTATION $!<this.orientation.val> XLEN $!<xLen> YLEN $!
<yLen> ZLEN $!<zLen> FILL ON
AID TRANSLUCENCY 0
AID TEXT NUMBER $!<this.aidNumGrating> 'Origin' AT $!
<this.gratingPos.val>
endmethod
if (!!ce.type.eq('FRMW')) then
!frmwOwner = !!ce
else
!frmwOwner = !!dtbGetOwnerType(!!ce,'FRMW')
endif
if (!frmwOwner.unset()) then
return error 1 'Unable to find FRMW type for Grating
4
to be created with. Must create a FRMW first or CE must be in
or below FRMW.'
endif
if (!frmwOwner.isnamed) then
!ownerName = !frmwOwner.name
else
!ownerName = '/STRUCTURAL'
endif
do !num
if (!num.lt(10)) then
!sbfrName = !ownerName & '-GR-0' & !num
else
!sbfrName = !ownerName & '-GR-' & !num
endif
var !exists exists $!<sbfrName>
break if (!exists.eq('FALSEA'))
!!ce = !sbfrName.dbref()
enddo
-- Enable Undo
!undoAble = object UNDOABLE()
!undoAble.description('Created Structural Grating.')
!undoAble.add()
!xDir = !this.orientation.val.xdir()
!yDir = !this.orientation.val.ydir()
!zDir = !this.orientation.val.zdir()
if (!zDir.string().split()[1].upcase().eq('D')) then
!sJus = 'UTOP'
!zOri = !zDir.opposite()
else
!sJus = 'UBOT'
!zOri = !zDir
endif
-- End Plate 1
NEW PANE
!paneRefe = !!ce
POSITION $!<this.gratingPos.val>
ORIENTATION $!<this.orientation.val>
NEW PLOO
HEIGHT $!<this.plHeight.val>
SJUSTIFICATION $!<sJus>
-- <1>
NEW PAVE
POSITION E 0 N 0 U 0
END
-- <2>
NEW PAVE
POSITION E $!<this.xLength.val> N 0 U 0
END
-- <3>
NEW PAVE
POSITION E $!<this.xLength.val> N $!
<this.plThick.val> U 0
END
-- <4>
NEW PAVE
POSITION E 0 N $!<this.plThick.val> U 0
END
END
END
-- End Plate 2
NEW PANE COPY $!<paneRefe> BY Y ($!<this.yLength.val>
- $!<this.plThick.val>) WRT CE
-- Bar Section
!spref = '/DESPAR-SPEC/Tube_with_design_parameters'
!possOffset = !this.gratingPos.val.offset(!yDir,!
this.pitchYdir.val).offset(!zOri,!this.plHeight.val - (!
this.rBarDia.val / 2))
!poseOffset = !possOffset.offset(!xDir,!
6
this.xLength.val)
NEW SCTN
!sctnRefe = !!ce
SPREF $!<spref>
DESP $!<this.rBarDia.val> ($!<this.rBarDia.val> /
2)
JUS NA
POSS $!<possOffset>
POSE $!<poseOffset>
DRNS PERP
DRNE PERP
END
!!ce = !sctnRefe
do !b from 1 to !yCopies.int()
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
enddo
if ((!yRemainder.real() * !this.pitchYdir.val) gt 10)
then
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
endif
END
-- Terminate Undo
!undoAble.endundoable()
!this.aidGratingBox()
endmethod
!this.aidGratingBox()
endif
endmethod
!this.aidGratingBox()
endmethod
-- Aid Box
10
AID CLEAR ALL $!<this.aidNumGrating>
AID TRANSLUCENCY 25
AID BOX NUMBER $!<this.aidNumGrating> AT $!<boxPos>
ORIENTATION $!<this.orientation.val> XLEN $!<xLen> YLEN $!
<yLen> ZLEN $!<zLen> FILL ON
AID TRANSLUCENCY 0
AID TEXT NUMBER $!<this.aidNumGrating> 'Origin' AT $!
<this.gratingPos.val>
endmethod
if (!!ce.type.eq('FRMW')) then
!frmwOwner = !!ce
else
!frmwOwner = !!dtbGetOwnerType(!!ce,'FRMW')
endif
if (!frmwOwner.unset()) then
return error 1 'Unable to find FRMW type for Grating
to be created with. Must create a FRMW first or CE must be in
or below FRMW.'
endif
if (!frmwOwner.isnamed) then
!ownerName = !frmwOwner.name
else
!ownerName = '/STRUCTURAL'
endif
do !num
if (!num.lt(10)) then
!sbfrName = !ownerName & '-GR-0' & !num
else
!sbfrName = !ownerName & '-GR-' & !num
endif
var !exists exists $!<sbfrName>
break if (!exists.eq('FALSEA'))
!!ce = !sbfrName.dbref()
enddo
-- Enable Undo
!undoAble = object UNDOABLE()
!undoAble.description('Created Structural Grating.')
!undoAble.add()
!xDir = !this.orientation.val.xdir()
!yDir = !this.orientation.val.ydir()
!zDir = !this.orientation.val.zdir()
if (!zDir.string().split()[1].upcase().eq('D')) then
!sJus = 'UTOP'
!zOri = !zDir.opposite()
else
!sJus = 'UBOT'
11
!zOri = !zDir
endif
-- End Plate 1
NEW PANE
!paneRefe = !!ce
POSITION $!<this.gratingPos.val>
ORIENTATION $!<this.orientation.val>
NEW PLOO
HEIGHT $!<this.plHeight.val>
SJUSTIFICATION $!<sJus>
-- <1>
NEW PAVE
POSITION E 0 N 0 U 0
END
-- <2>
NEW PAVE
12
POSITION E $!<this.xLength.val> N 0 U 0
END
-- <3>
NEW PAVE
POSITION E $!<this.xLength.val> N $!
<this.plThick.val> U 0
END
-- <4>
NEW PAVE
POSITION E 0 N $!<this.plThick.val> U 0
END
END
END
-- End Plate 2
NEW PANE COPY $!<paneRefe> BY Y ($!<this.yLength.val>
- $!<this.plThick.val>) WRT CE
-- Bar Section
!spref = '/DESPAR-SPEC/Tube_with_design_parameters'
!possOffset = !this.gratingPos.val.offset(!yDir,!
this.pitchYdir.val).offset(!zOri,!this.plHeight.val - (!
this.rBarDia.val / 2))
!poseOffset = !possOffset.offset(!xDir,!
this.xLength.val)
NEW SCTN
!sctnRefe = !!ce
SPREF $!<spref>
DESP $!<this.rBarDia.val> ($!<this.rBarDia.val> /
2)
JUS NA
POSS $!<possOffset>
POSE $!<poseOffset>
DRNS PERP
DRNE PERP
END
!!ce = !sctnRefe
do !b from 1 to !yCopies.int()
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
enddo
if ((!yRemainder.real() * !this.pitchYdir.val) gt 10)
then
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
endif
END
-- Terminate Undo
!undoAble.endundoable()
!this.aidGratingBox()
endmethod
!this.aidGratingBox()
endif
endmethod
16
define method .positionDone(!pickedData is EDGPOSITIONDATA)
!this.position.position('$!<pickedData.position>')
!!edgCntrl.remove(!this.packetDesc)
!this.gratingPos.val = !!createGrating.position
!this.aidGratingBox()
endmethod
-- Aid Box
AID CLEAR ALL $!<this.aidNumGrating>
AID TRANSLUCENCY 25
AID BOX NUMBER $!<this.aidNumGrating> AT $!<boxPos>
ORIENTATION $!<this.orientation.val> XLEN $!<xLen> YLEN $!
<yLen> ZLEN $!<zLen> FILL ON
AID TRANSLUCENCY 0
AID TEXT NUMBER $!<this.aidNumGrating> 'Origin' AT $!
<this.gratingPos.val>
endmethod
if (!!ce.type.eq('FRMW')) then
!frmwOwner = !!ce
else
!frmwOwner = !!dtbGetOwnerType(!!ce,'FRMW')
endif
if (!frmwOwner.unset()) then
return error 1 'Unable to find FRMW type for Grating
to be created with. Must create a FRMW first or CE must be in
or below FRMW.'
endif
if (!frmwOwner.isnamed) then
!ownerName = !frmwOwner.name
else
!ownerName = '/STRUCTURAL'
endif
do !num
17
if (!num.lt(10)) then
!sbfrName = !ownerName & '-GR-0' & !num
else
!sbfrName = !ownerName & '-GR-' & !num
endif
var !exists exists $!<sbfrName>
break if (!exists.eq('FALSEA'))
!!ce = !sbfrName.dbref()
enddo
-- Enable Undo
!undoAble = object UNDOABLE()
!undoAble.description('Created Structural Grating.')
!undoAble.add()
!xDir = !this.orientation.val.xdir()
!yDir = !this.orientation.val.ydir()
!zDir = !this.orientation.val.zdir()
if (!zDir.string().split()[1].upcase().eq('D')) then
!sJus = 'UTOP'
!zOri = !zDir.opposite()
else
!sJus = 'UBOT'
!zOri = !zDir
endif
-- End Plate 1
NEW PANE
!paneRefe = !!ce
POSITION $!<this.gratingPos.val>
ORIENTATION $!<this.orientation.val>
NEW PLOO
HEIGHT $!<this.plHeight.val>
SJUSTIFICATION $!<sJus>
-- <1>
NEW PAVE
POSITION E 0 N 0 U 0
END
-- <2>
NEW PAVE
POSITION E $!<this.xLength.val> N 0 U 0
END
-- <3>
NEW PAVE
POSITION E $!<this.xLength.val> N $!
<this.plThick.val> U 0
END
-- <4>
NEW PAVE
POSITION E 0 N $!<this.plThick.val> U 0
END
END
END
-- End Plate 2
NEW PANE COPY $!<paneRefe> BY Y ($!<this.yLength.val>
- $!<this.plThick.val>) WRT CE
-- Bar Section
!spref = '/DESPAR-SPEC/Tube_with_design_parameters'
!possOffset = !this.gratingPos.val.offset(!yDir,!
this.pitchYdir.val).offset(!zOri,!this.plHeight.val - (!
this.rBarDia.val / 2))
!poseOffset = !possOffset.offset(!xDir,!
this.xLength.val)
NEW SCTN
!sctnRefe = !!ce
SPREF $!<spref>
DESP $!<this.rBarDia.val> ($!<this.rBarDia.val> /
2)
JUS NA
POSS $!<possOffset>
POSE $!<poseOffset>
19
DRNS PERP
DRNE PERP
END
!!ce = !sctnRefe
do !b from 1 to !yCopies.int()
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
enddo
if ((!yRemainder.real() * !this.pitchYdir.val) gt 10)
then
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
endif
END
-- Terminate Undo
!undoAble.endundoable()
!this.aidGratingBox()
endmethod
!this.aidGratingBox()
endif
endmethod
!this.aidGratingBox()
endmethod
-- Aid Box
AID CLEAR ALL $!<this.aidNumGrating>
AID TRANSLUCENCY 25
AID BOX NUMBER $!<this.aidNumGrating> AT $!<boxPos>
ORIENTATION $!<this.orientation.val> XLEN $!<xLen> YLEN $!
<yLen> ZLEN $!<zLen> FILL ON
AID TRANSLUCENCY 0
AID TEXT NUMBER $!<this.aidNumGrating> 'Origin' AT $!
<this.gratingPos.val>
endmethod
23
define method .create()
!xCopies = (!this.xLength.val - !this.plThick.val) / !
this.pitchXdir.val
!yCopies = (!this.yLength.val / !this.pitchYdir.val) - 2
!xRemainder = '0.' & !xCopies.string('d2').after('.')
!yRemainder = '0.' & !yCopies.string('d2').after('.')
if (!!ce.type.eq('FRMW')) then
!frmwOwner = !!ce
else
!frmwOwner = !!dtbGetOwnerType(!!ce,'FRMW')
endif
if (!frmwOwner.unset()) then
return error 1 'Unable to find FRMW type for Grating
to be created with. Must create a FRMW first or CE must be in
or below FRMW.'
endif
if (!frmwOwner.isnamed) then
!ownerName = !frmwOwner.name
else
!ownerName = '/STRUCTURAL'
endif
do !num
if (!num.lt(10)) then
!sbfrName = !ownerName & '-GR-0' & !num
else
!sbfrName = !ownerName & '-GR-' & !num
endif
var !exists exists $!<sbfrName>
break if (!exists.eq('FALSEA'))
!!ce = !sbfrName.dbref()
enddo
-- Enable Undo
!undoAble = object UNDOABLE()
!undoAble.description('Created Structural Grating.')
!undoAble.add()
!xDir = !this.orientation.val.xdir()
!yDir = !this.orientation.val.ydir()
!zDir = !this.orientation.val.zdir()
if (!zDir.string().split()[1].upcase().eq('D')) then
!sJus = 'UTOP'
!zOri = !zDir.opposite()
else
!sJus = 'UBOT'
!zOri = !zDir
endif
-- End Plate 1
NEW PANE
!paneRefe = !!ce
POSITION $!<this.gratingPos.val>
ORIENTATION $!<this.orientation.val>
NEW PLOO
HEIGHT $!<this.plHeight.val>
SJUSTIFICATION $!<sJus>
-- <1>
NEW PAVE
POSITION E 0 N 0 U 0
END
-- <2>
NEW PAVE
POSITION E $!<this.xLength.val> N 0 U 0
END
-- <3>
NEW PAVE
POSITION E $!<this.xLength.val> N $!
<this.plThick.val> U 0
END
-- <4>
NEW PAVE
25
POSITION E 0 N $!<this.plThick.val> U 0
END
END
END
-- End Plate 2
NEW PANE COPY $!<paneRefe> BY Y ($!<this.yLength.val>
- $!<this.plThick.val>) WRT CE
-- Bar Section
!spref = '/DESPAR-SPEC/Tube_with_design_parameters'
!possOffset = !this.gratingPos.val.offset(!yDir,!
this.pitchYdir.val).offset(!zOri,!this.plHeight.val - (!
this.rBarDia.val / 2))
!poseOffset = !possOffset.offset(!xDir,!
this.xLength.val)
NEW SCTN
!sctnRefe = !!ce
SPREF $!<spref>
DESP $!<this.rBarDia.val> ($!<this.rBarDia.val> /
2)
JUS NA
POSS $!<possOffset>
POSE $!<poseOffset>
DRNS PERP
DRNE PERP
END
!!ce = !sctnRefe
do !b from 1 to !yCopies.int()
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
enddo
if ((!yRemainder.real() * !this.pitchYdir.val) gt 10)
then
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
endif
END
-- Terminate Undo
!undoAble.endundoable()
27
define method .createGrating()
!this.pickDimensions.setTooltip('Pick Dimensions for X-
Length & Y-Length by EDG measure.')
!this.pickDimensions.addPixmap(!!pml.getpathname
('pickview16.png'))
!this.interChange.addPixmap(!!pml.getpathname
('rotsup.png'))
!this.interChange.setTooltip('Swap X-Length & Y-Length
Dimensions.')
!this.pickPosition.addPixmap(!!pml.getpathname
('xyz16.png'))
!this.pickPosition.setTooltip('Set Origin of Structural
Grating by EDG Graphical Pick.')
!this.create.setTooltip('Create Structural Grating.')
!this.about.setTooltip('2015 - Aurelio Peros Hinampas')
!this.aidGratingBox()
endmethod
!this.aidGratingBox()
endif
endmethod
!this.aidGratingBox()
endmethod
-- Aid Box
AID CLEAR ALL $!<this.aidNumGrating>
AID TRANSLUCENCY 25
AID BOX NUMBER $!<this.aidNumGrating> AT $!<boxPos>
ORIENTATION $!<this.orientation.val> XLEN $!<xLen> YLEN $!
<yLen> ZLEN $!<zLen> FILL ON
AID TRANSLUCENCY 0
AID TEXT NUMBER $!<this.aidNumGrating> 'Origin' AT $!
<this.gratingPos.val>
endmethod
if (!!ce.type.eq('FRMW')) then
!frmwOwner = !!ce
else
!frmwOwner = !!dtbGetOwnerType(!!ce,'FRMW')
endif
if (!frmwOwner.unset()) then
return error 1 'Unable to find FRMW type for Grating
to be created with. Must create a FRMW first or CE must be in
or below FRMW.'
endif
if (!frmwOwner.isnamed) then
!ownerName = !frmwOwner.name
else
!ownerName = '/STRUCTURAL'
endif
do !num
if (!num.lt(10)) then
!sbfrName = !ownerName & '-GR-0' & !num
else
!sbfrName = !ownerName & '-GR-' & !num
endif
var !exists exists $!<sbfrName>
break if (!exists.eq('FALSEA'))
!!ce = !sbfrName.dbref()
enddo
30
-- Enable Undo
!undoAble = object UNDOABLE()
!undoAble.description('Created Structural Grating.')
!undoAble.add()
!xDir = !this.orientation.val.xdir()
!yDir = !this.orientation.val.ydir()
!zDir = !this.orientation.val.zdir()
if (!zDir.string().split()[1].upcase().eq('D')) then
!sJus = 'UTOP'
!zOri = !zDir.opposite()
else
!sJus = 'UBOT'
!zOri = !zDir
endif
-- Bar Section
!spref = '/DESPAR-SPEC/Tube_with_design_parameters'
!possOffset = !this.gratingPos.val.offset(!yDir,!
this.pitchYdir.val).offset(!zOri,!this.plHeight.val - (!
this.rBarDia.val / 2))
!poseOffset = !possOffset.offset(!xDir,!
this.xLength.val)
NEW SCTN
!sctnRefe = !!ce
SPREF $!<spref>
DESP $!<this.rBarDia.val> ($!<this.rBarDia.val> /
2)
JUS NA
POSS $!<possOffset>
POSE $!<poseOffset>
DRNS PERP
DRNE PERP
END
!!ce = !sctnRefe
do !b from 1 to !yCopies.int()
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
enddo
if ((!yRemainder.real() * !this.pitchYdir.val) gt 10)
32
then
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
endif
END
-- Terminate Undo
!undoAble.endundoable()
!this.aidGratingBox()
endmethod
!this.aidGratingBox()
endmethod
-- Aid Box
AID CLEAR ALL $!<this.aidNumGrating>
AID TRANSLUCENCY 25
AID BOX NUMBER $!<this.aidNumGrating> AT $!<boxPos>
ORIENTATION $!<this.orientation.val> XLEN $!<xLen> YLEN $!
<yLen> ZLEN $!<zLen> FILL ON
AID TRANSLUCENCY 0
AID TEXT NUMBER $!<this.aidNumGrating> 'Origin' AT $!
<this.gratingPos.val>
endmethod
if (!!ce.type.eq('FRMW')) then
36
!frmwOwner = !!ce
else
!frmwOwner = !!dtbGetOwnerType(!!ce,'FRMW')
endif
if (!frmwOwner.unset()) then
return error 1 'Unable to find FRMW type for Grating
to be created with. Must create a FRMW first or CE must be in
or below FRMW.'
endif
if (!frmwOwner.isnamed) then
!ownerName = !frmwOwner.name
else
!ownerName = '/STRUCTURAL'
endif
do !num
if (!num.lt(10)) then
!sbfrName = !ownerName & '-GR-0' & !num
else
!sbfrName = !ownerName & '-GR-' & !num
endif
var !exists exists $!<sbfrName>
break if (!exists.eq('FALSEA'))
!!ce = !sbfrName.dbref()
enddo
-- Enable Undo
!undoAble = object UNDOABLE()
!undoAble.description('Created Structural Grating.')
!undoAble.add()
!xDir = !this.orientation.val.xdir()
!yDir = !this.orientation.val.ydir()
!zDir = !this.orientation.val.zdir()
if (!zDir.string().split()[1].upcase().eq('D')) then
!sJus = 'UTOP'
!zOri = !zDir.opposite()
else
!sJus = 'UBOT'
!zOri = !zDir
endif
-- End Plate 1
NEW PANE
!paneRefe = !!ce
POSITION $!<this.gratingPos.val>
ORIENTATION $!<this.orientation.val>
NEW PLOO
HEIGHT $!<this.plHeight.val>
SJUSTIFICATION $!<sJus>
-- <1>
NEW PAVE
POSITION E 0 N 0 U 0
END
-- <2>
NEW PAVE
POSITION E $!<this.xLength.val> N 0 U 0
END
-- <3>
NEW PAVE
POSITION E $!<this.xLength.val> N $!
<this.plThick.val> U 0
END
-- <4>
NEW PAVE
POSITION E 0 N $!<this.plThick.val> U 0
END
END
END
-- End Plate 2
NEW PANE COPY $!<paneRefe> BY Y ($!<this.yLength.val>
- $!<this.plThick.val>) WRT CE
-- Bar Section
38
!spref = '/DESPAR-SPEC/Tube_with_design_parameters'
!possOffset = !this.gratingPos.val.offset(!yDir,!
this.pitchYdir.val).offset(!zOri,!this.plHeight.val - (!
this.rBarDia.val / 2))
!poseOffset = !possOffset.offset(!xDir,!
this.xLength.val)
NEW SCTN
!sctnRefe = !!ce
SPREF $!<spref>
DESP $!<this.rBarDia.val> ($!<this.rBarDia.val> /
2)
JUS NA
POSS $!<possOffset>
POSE $!<poseOffset>
DRNS PERP
DRNE PERP
END
!!ce = !sctnRefe
do !b from 1 to !yCopies.int()
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
enddo
if ((!yRemainder.real() * !this.pitchYdir.val) gt 10)
then
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
endif
END
-- Terminate Undo
!undoAble.endundoable()
!this.aidGratingBox()
endmethod
!this.aidGratingBox()
endif
endmethod
!this.aidGratingBox()
endmethod
-- Aid Box
AID CLEAR ALL $!<this.aidNumGrating>
AID TRANSLUCENCY 25
AID BOX NUMBER $!<this.aidNumGrating> AT $!<boxPos>
ORIENTATION $!<this.orientation.val> XLEN $!<xLen> YLEN $!
<yLen> ZLEN $!<zLen> FILL ON
AID TRANSLUCENCY 0
AID TEXT NUMBER $!<this.aidNumGrating> 'Origin' AT $!
<this.gratingPos.val>
endmethod
if (!!ce.type.eq('FRMW')) then
!frmwOwner = !!ce
else
!frmwOwner = !!dtbGetOwnerType(!!ce,'FRMW')
endif
if (!frmwOwner.unset()) then
return error 1 'Unable to find FRMW type for Grating
to be created with. Must create a FRMW first or CE must be in
or below FRMW.'
endif
if (!frmwOwner.isnamed) then
!ownerName = !frmwOwner.name
else
!ownerName = '/STRUCTURAL'
endif
do !num
if (!num.lt(10)) then
!sbfrName = !ownerName & '-GR-0' & !num
else
!sbfrName = !ownerName & '-GR-' & !num
endif
var !exists exists $!<sbfrName>
break if (!exists.eq('FALSEA'))
!!ce = !sbfrName.dbref()
enddo
-- Enable Undo
!undoAble = object UNDOABLE()
!undoAble.description('Created Structural Grating.')
!undoAble.add()
!xDir = !this.orientation.val.xdir()
!yDir = !this.orientation.val.ydir()
!zDir = !this.orientation.val.zdir()
43
if (!zDir.string().split()[1].upcase().eq('D')) then
!sJus = 'UTOP'
!zOri = !zDir.opposite()
else
!sJus = 'UBOT'
!zOri = !zDir
endif
-- End Plate 1
NEW PANE
!paneRefe = !!ce
POSITION $!<this.gratingPos.val>
ORIENTATION $!<this.orientation.val>
NEW PLOO
HEIGHT $!<this.plHeight.val>
SJUSTIFICATION $!<sJus>
44
-- <1>
NEW PAVE
POSITION E 0 N 0 U 0
END
-- <2>
NEW PAVE
POSITION E $!<this.xLength.val> N 0 U 0
END
-- <3>
NEW PAVE
POSITION E $!<this.xLength.val> N $!
<this.plThick.val> U 0
END
-- <4>
NEW PAVE
POSITION E 0 N $!<this.plThick.val> U 0
END
END
END
-- End Plate 2
NEW PANE COPY $!<paneRefe> BY Y ($!<this.yLength.val>
- $!<this.plThick.val>) WRT CE
-- Bar Section
!spref = '/DESPAR-SPEC/Tube_with_design_parameters'
!possOffset = !this.gratingPos.val.offset(!yDir,!
this.pitchYdir.val).offset(!zOri,!this.plHeight.val - (!
this.rBarDia.val / 2))
!poseOffset = !possOffset.offset(!xDir,!
this.xLength.val)
NEW SCTN
!sctnRefe = !!ce
SPREF $!<spref>
DESP $!<this.rBarDia.val> ($!<this.rBarDia.val> /
2)
JUS NA
POSS $!<possOffset>
POSE $!<poseOffset>
DRNS PERP
DRNE PERP
END
!!ce = !sctnRefe
do !b from 1 to !yCopies.int()
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
enddo
if ((!yRemainder.real() * !this.pitchYdir.val) gt 10)
then
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
endif
END
-- Terminate Undo
!undoAble.endundoable()
45
AID CLEAR ALL $!<this.aidNumGrating>
endmethod
!this.aidGratingBox()
endmethod
!this.aidGratingBox()
endif
endmethod
!this.aidGratingBox()
endmethod
-- Aid Box
AID CLEAR ALL $!<this.aidNumGrating>
AID TRANSLUCENCY 25
AID BOX NUMBER $!<this.aidNumGrating> AT $!<boxPos>
ORIENTATION $!<this.orientation.val> XLEN $!<xLen> YLEN $!
<yLen> ZLEN $!<zLen> FILL ON
AID TRANSLUCENCY 0
AID TEXT NUMBER $!<this.aidNumGrating> 'Origin' AT $!
<this.gratingPos.val>
endmethod
if (!!ce.type.eq('FRMW')) then
!frmwOwner = !!ce
else
!frmwOwner = !!dtbGetOwnerType(!!ce,'FRMW')
endif
if (!frmwOwner.unset()) then
return error 1 'Unable to find FRMW type for Grating
to be created with. Must create a FRMW first or CE must be in
or below FRMW.'
endif
49
if (!frmwOwner.isnamed) then
!ownerName = !frmwOwner.name
else
!ownerName = '/STRUCTURAL'
endif
do !num
if (!num.lt(10)) then
!sbfrName = !ownerName & '-GR-0' & !num
else
!sbfrName = !ownerName & '-GR-' & !num
endif
var !exists exists $!<sbfrName>
break if (!exists.eq('FALSEA'))
!!ce = !sbfrName.dbref()
enddo
-- Enable Undo
!undoAble = object UNDOABLE()
!undoAble.description('Created Structural Grating.')
!undoAble.add()
!xDir = !this.orientation.val.xdir()
!yDir = !this.orientation.val.ydir()
!zDir = !this.orientation.val.zdir()
if (!zDir.string().split()[1].upcase().eq('D')) then
!sJus = 'UTOP'
!zOri = !zDir.opposite()
else
!sJus = 'UBOT'
!zOri = !zDir
endif
-- End Plate 1
NEW PANE
!paneRefe = !!ce
POSITION $!<this.gratingPos.val>
ORIENTATION $!<this.orientation.val>
NEW PLOO
HEIGHT $!<this.plHeight.val>
SJUSTIFICATION $!<sJus>
-- <1>
NEW PAVE
POSITION E 0 N 0 U 0
END
-- <2>
NEW PAVE
POSITION E $!<this.xLength.val> N 0 U 0
END
-- <3>
NEW PAVE
POSITION E $!<this.xLength.val> N $!
<this.plThick.val> U 0
END
-- <4>
NEW PAVE
POSITION E 0 N $!<this.plThick.val> U 0
END
END
END
-- End Plate 2
NEW PANE COPY $!<paneRefe> BY Y ($!<this.yLength.val>
- $!<this.plThick.val>) WRT CE
-- Bar Section
!spref = '/DESPAR-SPEC/Tube_with_design_parameters'
!possOffset = !this.gratingPos.val.offset(!yDir,!
this.pitchYdir.val).offset(!zOri,!this.plHeight.val - (!
this.rBarDia.val / 2))
!poseOffset = !possOffset.offset(!xDir,!
this.xLength.val)
NEW SCTN
!sctnRefe = !!ce
51
SPREF $!<spref>
DESP $!<this.rBarDia.val> ($!<this.rBarDia.val> /
2)
JUS NA
POSS $!<possOffset>
POSE $!<poseOffset>
DRNS PERP
DRNE PERP
END
!!ce = !sctnRefe
do !b from 1 to !yCopies.int()
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
enddo
if ((!yRemainder.real() * !this.pitchYdir.val) gt 10)
then
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
endif
END
-- Terminate Undo
!undoAble.endundoable()
!this.aidGratingBox()
endmethod
!this.aidGratingBox()
endif
endmethod
!this.aidGratingBox()
endmethod
-- Aid Box
AID CLEAR ALL $!<this.aidNumGrating>
AID TRANSLUCENCY 25
AID BOX NUMBER $!<this.aidNumGrating> AT $!<boxPos>
55
ORIENTATION $!<this.orientation.val> XLEN $!<xLen> YLEN $!
<yLen> ZLEN $!<zLen> FILL ON
AID TRANSLUCENCY 0
AID TEXT NUMBER $!<this.aidNumGrating> 'Origin' AT $!
<this.gratingPos.val>
endmethod
if (!!ce.type.eq('FRMW')) then
!frmwOwner = !!ce
else
!frmwOwner = !!dtbGetOwnerType(!!ce,'FRMW')
endif
if (!frmwOwner.unset()) then
return error 1 'Unable to find FRMW type for Grating
to be created with. Must create a FRMW first or CE must be in
or below FRMW.'
endif
if (!frmwOwner.isnamed) then
!ownerName = !frmwOwner.name
else
!ownerName = '/STRUCTURAL'
endif
do !num
if (!num.lt(10)) then
!sbfrName = !ownerName & '-GR-0' & !num
else
!sbfrName = !ownerName & '-GR-' & !num
endif
var !exists exists $!<sbfrName>
break if (!exists.eq('FALSEA'))
!!ce = !sbfrName.dbref()
enddo
-- Enable Undo
!undoAble = object UNDOABLE()
!undoAble.description('Created Structural Grating.')
!undoAble.add()
!xDir = !this.orientation.val.xdir()
!yDir = !this.orientation.val.ydir()
!zDir = !this.orientation.val.zdir()
if (!zDir.string().split()[1].upcase().eq('D')) then
!sJus = 'UTOP'
!zOri = !zDir.opposite()
else
!sJus = 'UBOT'
!zOri = !zDir
endif
56
NEW SBFR $!<sbfrName>
NEW PANE
!paneRefe = !!ce
POSITION $!<this.gratingPos.val>
ORIENTATION $!<this.orientation.val>
NEW PLOO
HEIGHT $!<this.plHeight.val>
SJUSTIFICATION $!<sJus>
-- <1>
NEW PAVE
POSITION E 0 N $!<this.plThick.val> U 0
END
-- <2>
NEW PAVE
POSITION E 0 N ($!<this.yLength.val> - $!
<this.plThick.val>) U 0
END
-- <3>
NEW PAVE
POSITION E $!<this.plThick.val> N ($!
<this.yLength.val> - $!<this.plThick.val>) U 0
END
-- <4>
NEW PAVE
POSITION E $!<this.plThick.val> N $!
<this.plThick.val> U 0
END
END
END
!!ce = !paneRefe
-- Copy Pane Along X-Direction
do !c from 1 to !xCopies.int()
skip if (!c.eq(!xCopies.int()) and !
xRemainder.real().lt(0.5))
NEW PANE COPY SAME BY X $!<this.pitchXdir.val> WRT
CE
enddo
NEW PANE COPY $!<paneRefe> BY X ($!<this.xLength.val>
- $!<this.plThick.val>) WRT CE
-- End Plate 1
NEW PANE
!paneRefe = !!ce
POSITION $!<this.gratingPos.val>
ORIENTATION $!<this.orientation.val>
NEW PLOO
HEIGHT $!<this.plHeight.val>
SJUSTIFICATION $!<sJus>
-- <1>
NEW PAVE
POSITION E 0 N 0 U 0
END
-- <2>
NEW PAVE
POSITION E $!<this.xLength.val> N 0 U 0
END
-- <3>
57
NEW PAVE
POSITION E $!<this.xLength.val> N $!
<this.plThick.val> U 0
END
-- <4>
NEW PAVE
POSITION E 0 N $!<this.plThick.val> U 0
END
END
END
-- End Plate 2
NEW PANE COPY $!<paneRefe> BY Y ($!<this.yLength.val>
- $!<this.plThick.val>) WRT CE
-- Bar Section
!spref = '/DESPAR-SPEC/Tube_with_design_parameters'
!possOffset = !this.gratingPos.val.offset(!yDir,!
this.pitchYdir.val).offset(!zOri,!this.plHeight.val - (!
this.rBarDia.val / 2))
!poseOffset = !possOffset.offset(!xDir,!
this.xLength.val)
NEW SCTN
!sctnRefe = !!ce
SPREF $!<spref>
DESP $!<this.rBarDia.val> ($!<this.rBarDia.val> /
2)
JUS NA
POSS $!<possOffset>
POSE $!<poseOffset>
DRNS PERP
DRNE PERP
END
!!ce = !sctnRefe
do !b from 1 to !yCopies.int()
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
enddo
if ((!yRemainder.real() * !this.pitchYdir.val) gt 10)
then
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
endif
END
-- Terminate Undo
!undoAble.endundoable()
!this.aidGratingBox()
endmethod
!this.aidGratingBox()
endif
endmethod
!this.aidGratingBox()
endmethod
-- Aid Box
AID CLEAR ALL $!<this.aidNumGrating>
AID TRANSLUCENCY 25
AID BOX NUMBER $!<this.aidNumGrating> AT $!<boxPos>
ORIENTATION $!<this.orientation.val> XLEN $!<xLen> YLEN $!
<yLen> ZLEN $!<zLen> FILL ON
AID TRANSLUCENCY 0
AID TEXT NUMBER $!<this.aidNumGrating> 'Origin' AT $!
<this.gratingPos.val>
endmethod
if (!!ce.type.eq('FRMW')) then
!frmwOwner = !!ce
else
!frmwOwner = !!dtbGetOwnerType(!!ce,'FRMW')
endif
if (!frmwOwner.unset()) then
return error 1 'Unable to find FRMW type for Grating
to be created with. Must create a FRMW first or CE must be in
or below FRMW.'
endif
if (!frmwOwner.isnamed) then
!ownerName = !frmwOwner.name
else
!ownerName = '/STRUCTURAL'
endif
do !num
if (!num.lt(10)) then
!sbfrName = !ownerName & '-GR-0' & !num
else
62
!sbfrName = !ownerName & '-GR-' & !num
endif
var !exists exists $!<sbfrName>
break if (!exists.eq('FALSEA'))
!!ce = !sbfrName.dbref()
enddo
-- Enable Undo
!undoAble = object UNDOABLE()
!undoAble.description('Created Structural Grating.')
!undoAble.add()
!xDir = !this.orientation.val.xdir()
!yDir = !this.orientation.val.ydir()
!zDir = !this.orientation.val.zdir()
if (!zDir.string().split()[1].upcase().eq('D')) then
!sJus = 'UTOP'
!zOri = !zDir.opposite()
else
!sJus = 'UBOT'
!zOri = !zDir
endif
-- End Plate 1
NEW PANE
!paneRefe = !!ce
POSITION $!<this.gratingPos.val>
ORIENTATION $!<this.orientation.val>
NEW PLOO
HEIGHT $!<this.plHeight.val>
SJUSTIFICATION $!<sJus>
-- <1>
NEW PAVE
POSITION E 0 N 0 U 0
END
-- <2>
NEW PAVE
POSITION E $!<this.xLength.val> N 0 U 0
END
-- <3>
NEW PAVE
POSITION E $!<this.xLength.val> N $!
<this.plThick.val> U 0
END
-- <4>
NEW PAVE
POSITION E 0 N $!<this.plThick.val> U 0
END
END
END
-- End Plate 2
NEW PANE COPY $!<paneRefe> BY Y ($!<this.yLength.val>
- $!<this.plThick.val>) WRT CE
-- Bar Section
!spref = '/DESPAR-SPEC/Tube_with_design_parameters'
!possOffset = !this.gratingPos.val.offset(!yDir,!
this.pitchYdir.val).offset(!zOri,!this.plHeight.val - (!
this.rBarDia.val / 2))
!poseOffset = !possOffset.offset(!xDir,!
this.xLength.val)
NEW SCTN
!sctnRefe = !!ce
SPREF $!<spref>
DESP $!<this.rBarDia.val> ($!<this.rBarDia.val> /
2)
JUS NA
POSS $!<possOffset>
POSE $!<poseOffset>
DRNS PERP
DRNE PERP
END
64
!!ce = !sctnRefe
do !b from 1 to !yCopies.int()
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
enddo
if ((!yRemainder.real() * !this.pitchYdir.val) gt 10)
then
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
endif
END
-- Terminate Undo
!undoAble.endundoable()
!this.aidGratingBox()
endmethod
!this.aidGratingBox()
endif
endmethod
!this.aidGratingBox()
endmethod
-- Aid Box
AID CLEAR ALL $!<this.aidNumGrating>
AID TRANSLUCENCY 25
AID BOX NUMBER $!<this.aidNumGrating> AT $!<boxPos>
ORIENTATION $!<this.orientation.val> XLEN $!<xLen> YLEN $!
<yLen> ZLEN $!<zLen> FILL ON
AID TRANSLUCENCY 0
AID TEXT NUMBER $!<this.aidNumGrating> 'Origin' AT $!
<this.gratingPos.val>
endmethod
if (!!ce.type.eq('FRMW')) then
!frmwOwner = !!ce
else
!frmwOwner = !!dtbGetOwnerType(!!ce,'FRMW')
endif
if (!frmwOwner.unset()) then
return error 1 'Unable to find FRMW type for Grating
to be created with. Must create a FRMW first or CE must be in
or below FRMW.'
endif
if (!frmwOwner.isnamed) then
!ownerName = !frmwOwner.name
else
!ownerName = '/STRUCTURAL'
endif
do !num
if (!num.lt(10)) then
!sbfrName = !ownerName & '-GR-0' & !num
else
!sbfrName = !ownerName & '-GR-' & !num
endif
var !exists exists $!<sbfrName>
break if (!exists.eq('FALSEA'))
!!ce = !sbfrName.dbref()
enddo
-- Enable Undo
!undoAble = object UNDOABLE()
!undoAble.description('Created Structural Grating.')
!undoAble.add()
!xDir = !this.orientation.val.xdir()
!yDir = !this.orientation.val.ydir()
!zDir = !this.orientation.val.zdir()
if (!zDir.string().split()[1].upcase().eq('D')) then
!sJus = 'UTOP'
!zOri = !zDir.opposite()
else
!sJus = 'UBOT'
!zOri = !zDir
endif
-- End Plate 1
NEW PANE
!paneRefe = !!ce
POSITION $!<this.gratingPos.val>
ORIENTATION $!<this.orientation.val>
NEW PLOO
HEIGHT $!<this.plHeight.val>
SJUSTIFICATION $!<sJus>
-- <1>
NEW PAVE
POSITION E 0 N 0 U 0
END
-- <2>
NEW PAVE
POSITION E $!<this.xLength.val> N 0 U 0
END
-- <3>
NEW PAVE
POSITION E $!<this.xLength.val> N $!
<this.plThick.val> U 0
END
-- <4>
NEW PAVE
POSITION E 0 N $!<this.plThick.val> U 0
END
END
70
END
-- End Plate 2
NEW PANE COPY $!<paneRefe> BY Y ($!<this.yLength.val>
- $!<this.plThick.val>) WRT CE
-- Bar Section
!spref = '/DESPAR-SPEC/Tube_with_design_parameters'
!possOffset = !this.gratingPos.val.offset(!yDir,!
this.pitchYdir.val).offset(!zOri,!this.plHeight.val - (!
this.rBarDia.val / 2))
!poseOffset = !possOffset.offset(!xDir,!
this.xLength.val)
NEW SCTN
!sctnRefe = !!ce
SPREF $!<spref>
DESP $!<this.rBarDia.val> ($!<this.rBarDia.val> /
2)
JUS NA
POSS $!<possOffset>
POSE $!<poseOffset>
DRNS PERP
DRNE PERP
END
!!ce = !sctnRefe
do !b from 1 to !yCopies.int()
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
enddo
if ((!yRemainder.real() * !this.pitchYdir.val) gt 10)
then
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
endif
END
-- Terminate Undo
!undoAble.endundoable()
!this.aidGratingBox()
endmethod
!this.aidGratingBox()
endif
endmethod
!this.aidGratingBox()
endmethod
-- Aid Box
AID CLEAR ALL $!<this.aidNumGrating>
AID TRANSLUCENCY 25
AID BOX NUMBER $!<this.aidNumGrating> AT $!<boxPos>
ORIENTATION $!<this.orientation.val> XLEN $!<xLen> YLEN $!
<yLen> ZLEN $!<zLen> FILL ON
AID TRANSLUCENCY 0
AID TEXT NUMBER $!<this.aidNumGrating> 'Origin' AT $!
<this.gratingPos.val>
endmethod
if (!!ce.type.eq('FRMW')) then
!frmwOwner = !!ce
else
!frmwOwner = !!dtbGetOwnerType(!!ce,'FRMW')
endif
if (!frmwOwner.unset()) then
return error 1 'Unable to find FRMW type for Grating
to be created with. Must create a FRMW first or CE must be in
or below FRMW.'
endif
if (!frmwOwner.isnamed) then
!ownerName = !frmwOwner.name
else
!ownerName = '/STRUCTURAL'
endif
do !num
if (!num.lt(10)) then
!sbfrName = !ownerName & '-GR-0' & !num
else
!sbfrName = !ownerName & '-GR-' & !num
endif
var !exists exists $!<sbfrName>
break if (!exists.eq('FALSEA'))
!!ce = !sbfrName.dbref()
enddo
-- Enable Undo
!undoAble = object UNDOABLE()
75
!undoAble.description('Created Structural Grating.')
!undoAble.add()
!xDir = !this.orientation.val.xdir()
!yDir = !this.orientation.val.ydir()
!zDir = !this.orientation.val.zdir()
if (!zDir.string().split()[1].upcase().eq('D')) then
!sJus = 'UTOP'
!zOri = !zDir.opposite()
else
!sJus = 'UBOT'
!zOri = !zDir
endif
-- End Plate 1
NEW PANE
76
!paneRefe = !!ce
POSITION $!<this.gratingPos.val>
ORIENTATION $!<this.orientation.val>
NEW PLOO
HEIGHT $!<this.plHeight.val>
SJUSTIFICATION $!<sJus>
-- <1>
NEW PAVE
POSITION E 0 N 0 U 0
END
-- <2>
NEW PAVE
POSITION E $!<this.xLength.val> N 0 U 0
END
-- <3>
NEW PAVE
POSITION E $!<this.xLength.val> N $!
<this.plThick.val> U 0
END
-- <4>
NEW PAVE
POSITION E 0 N $!<this.plThick.val> U 0
END
END
END
-- End Plate 2
NEW PANE COPY $!<paneRefe> BY Y ($!<this.yLength.val>
- $!<this.plThick.val>) WRT CE
-- Bar Section
!spref = '/DESPAR-SPEC/Tube_with_design_parameters'
!possOffset = !this.gratingPos.val.offset(!yDir,!
this.pitchYdir.val).offset(!zOri,!this.plHeight.val - (!
this.rBarDia.val / 2))
!poseOffset = !possOffset.offset(!xDir,!
this.xLength.val)
NEW SCTN
!sctnRefe = !!ce
SPREF $!<spref>
DESP $!<this.rBarDia.val> ($!<this.rBarDia.val> /
2)
JUS NA
POSS $!<possOffset>
POSE $!<poseOffset>
DRNS PERP
DRNE PERP
END
!!ce = !sctnRefe
do !b from 1 to !yCopies.int()
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
enddo
if ((!yRemainder.real() * !this.pitchYdir.val) gt 10)
then
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
77
endif
END
-- Terminate Undo
!undoAble.endundoable()
!this.aidGratingBox()
endmethod
!this.aidGratingBox()
endif
80
endmethod
!this.aidGratingBox()
endmethod
-- Aid Box
AID CLEAR ALL $!<this.aidNumGrating>
AID TRANSLUCENCY 25
AID BOX NUMBER $!<this.aidNumGrating> AT $!<boxPos>
ORIENTATION $!<this.orientation.val> XLEN $!<xLen> YLEN $!
<yLen> ZLEN $!<zLen> FILL ON
AID TRANSLUCENCY 0
AID TEXT NUMBER $!<this.aidNumGrating> 'Origin' AT $!
<this.gratingPos.val>
endmethod
if (!!ce.type.eq('FRMW')) then
!frmwOwner = !!ce
else
!frmwOwner = !!dtbGetOwnerType(!!ce,'FRMW')
81
endif
if (!frmwOwner.unset()) then
return error 1 'Unable to find FRMW type for Grating
to be created with. Must create a FRMW first or CE must be in
or below FRMW.'
endif
if (!frmwOwner.isnamed) then
!ownerName = !frmwOwner.name
else
!ownerName = '/STRUCTURAL'
endif
do !num
if (!num.lt(10)) then
!sbfrName = !ownerName & '-GR-0' & !num
else
!sbfrName = !ownerName & '-GR-' & !num
endif
var !exists exists $!<sbfrName>
break if (!exists.eq('FALSEA'))
!!ce = !sbfrName.dbref()
enddo
-- Enable Undo
!undoAble = object UNDOABLE()
!undoAble.description('Created Structural Grating.')
!undoAble.add()
!xDir = !this.orientation.val.xdir()
!yDir = !this.orientation.val.ydir()
!zDir = !this.orientation.val.zdir()
if (!zDir.string().split()[1].upcase().eq('D')) then
!sJus = 'UTOP'
!zOri = !zDir.opposite()
else
!sJus = 'UBOT'
!zOri = !zDir
endif
-- End Plate 1
NEW PANE
!paneRefe = !!ce
POSITION $!<this.gratingPos.val>
ORIENTATION $!<this.orientation.val>
NEW PLOO
HEIGHT $!<this.plHeight.val>
SJUSTIFICATION $!<sJus>
-- <1>
NEW PAVE
POSITION E 0 N 0 U 0
END
-- <2>
NEW PAVE
POSITION E $!<this.xLength.val> N 0 U 0
END
-- <3>
NEW PAVE
POSITION E $!<this.xLength.val> N $!
<this.plThick.val> U 0
END
-- <4>
NEW PAVE
POSITION E 0 N $!<this.plThick.val> U 0
END
END
END
-- End Plate 2
NEW PANE COPY $!<paneRefe> BY Y ($!<this.yLength.val>
- $!<this.plThick.val>) WRT CE
-- Bar Section
!spref = '/DESPAR-SPEC/Tube_with_design_parameters'
!possOffset = !this.gratingPos.val.offset(!yDir,!
83
this.pitchYdir.val).offset(!zOri,!this.plHeight.val - (!
this.rBarDia.val / 2))
!poseOffset = !possOffset.offset(!xDir,!
this.xLength.val)
NEW SCTN
!sctnRefe = !!ce
SPREF $!<spref>
DESP $!<this.rBarDia.val> ($!<this.rBarDia.val> /
2)
JUS NA
POSS $!<possOffset>
POSE $!<poseOffset>
DRNS PERP
DRNE PERP
END
!!ce = !sctnRefe
do !b from 1 to !yCopies.int()
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
enddo
if ((!yRemainder.real() * !this.pitchYdir.val) gt 10)
then
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
endif
END
-- Terminate Undo
!undoAble.endundoable()
!this.aidGratingBox()
endmethod
!this.aidGratingBox()
endif
endmethod
!this.aidGratingBox()
endmethod
-- Aid Box
AID CLEAR ALL $!<this.aidNumGrating>
AID TRANSLUCENCY 25
AID BOX NUMBER $!<this.aidNumGrating> AT $!<boxPos>
ORIENTATION $!<this.orientation.val> XLEN $!<xLen> YLEN $!
<yLen> ZLEN $!<zLen> FILL ON
AID TRANSLUCENCY 0
AID TEXT NUMBER $!<this.aidNumGrating> 'Origin' AT $!
<this.gratingPos.val>
endmethod
if (!!ce.type.eq('FRMW')) then
!frmwOwner = !!ce
else
!frmwOwner = !!dtbGetOwnerType(!!ce,'FRMW')
endif
if (!frmwOwner.unset()) then
return error 1 'Unable to find FRMW type for Grating
to be created with. Must create a FRMW first or CE must be in
or below FRMW.'
endif
if (!frmwOwner.isnamed) then
!ownerName = !frmwOwner.name
else
!ownerName = '/STRUCTURAL'
endif
do !num
if (!num.lt(10)) then
!sbfrName = !ownerName & '-GR-0' & !num
else
!sbfrName = !ownerName & '-GR-' & !num
endif
var !exists exists $!<sbfrName>
break if (!exists.eq('FALSEA'))
!!ce = !sbfrName.dbref()
enddo
-- Enable Undo
!undoAble = object UNDOABLE()
!undoAble.description('Created Structural Grating.')
!undoAble.add()
!xDir = !this.orientation.val.xdir()
!yDir = !this.orientation.val.ydir()
!zDir = !this.orientation.val.zdir()
if (!zDir.string().split()[1].upcase().eq('D')) then
!sJus = 'UTOP'
88
!zOri = !zDir.opposite()
else
!sJus = 'UBOT'
!zOri = !zDir
endif
-- End Plate 1
NEW PANE
!paneRefe = !!ce
POSITION $!<this.gratingPos.val>
ORIENTATION $!<this.orientation.val>
NEW PLOO
HEIGHT $!<this.plHeight.val>
SJUSTIFICATION $!<sJus>
-- <1>
NEW PAVE
POSITION E 0 N 0 U 0
89
END
-- <2>
NEW PAVE
POSITION E $!<this.xLength.val> N 0 U 0
END
-- <3>
NEW PAVE
POSITION E $!<this.xLength.val> N $!
<this.plThick.val> U 0
END
-- <4>
NEW PAVE
POSITION E 0 N $!<this.plThick.val> U 0
END
END
END
-- End Plate 2
NEW PANE COPY $!<paneRefe> BY Y ($!<this.yLength.val>
- $!<this.plThick.val>) WRT CE
-- Bar Section
!spref = '/DESPAR-SPEC/Tube_with_design_parameters'
!possOffset = !this.gratingPos.val.offset(!yDir,!
this.pitchYdir.val).offset(!zOri,!this.plHeight.val - (!
this.rBarDia.val / 2))
!poseOffset = !possOffset.offset(!xDir,!
this.xLength.val)
NEW SCTN
!sctnRefe = !!ce
SPREF $!<spref>
DESP $!<this.rBarDia.val> ($!<this.rBarDia.val> /
2)
JUS NA
POSS $!<possOffset>
POSE $!<poseOffset>
DRNS PERP
DRNE PERP
END
!!ce = !sctnRefe
do !b from 1 to !yCopies.int()
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
enddo
if ((!yRemainder.real() * !this.pitchYdir.val) gt 10)
then
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
endif
END
-- Terminate Undo
!undoAble.endundoable()
90
define method .dismiss()
AID CLEAR ALL $!<this.aidNumGrating>
!this.hide()
endmethodsetup form !!createGrating dialog dock
!this.formtitle = 'Create Structural Grating'
!this.cancelcall = '!this.dismiss()'
!this.aidGratingBox()
endmethod
!this.aidGratingBox()
endif
endmethod
!this.aidGratingBox()
endmethod
-- Aid Box
AID CLEAR ALL $!<this.aidNumGrating>
AID TRANSLUCENCY 25
AID BOX NUMBER $!<this.aidNumGrating> AT $!<boxPos>
ORIENTATION $!<this.orientation.val> XLEN $!<xLen> YLEN $!
<yLen> ZLEN $!<zLen> FILL ON
AID TRANSLUCENCY 0
AID TEXT NUMBER $!<this.aidNumGrating> 'Origin' AT $!
<this.gratingPos.val>
endmethod
if (!!ce.type.eq('FRMW')) then
!frmwOwner = !!ce
else
!frmwOwner = !!dtbGetOwnerType(!!ce,'FRMW')
endif
if (!frmwOwner.unset()) then
return error 1 'Unable to find FRMW type for Grating
to be created with. Must create a FRMW first or CE must be in
or below FRMW.'
endif
if (!frmwOwner.isnamed) then
!ownerName = !frmwOwner.name
else
94
!ownerName = '/STRUCTURAL'
endif
do !num
if (!num.lt(10)) then
!sbfrName = !ownerName & '-GR-0' & !num
else
!sbfrName = !ownerName & '-GR-' & !num
endif
var !exists exists $!<sbfrName>
break if (!exists.eq('FALSEA'))
!!ce = !sbfrName.dbref()
enddo
-- Enable Undo
!undoAble = object UNDOABLE()
!undoAble.description('Created Structural Grating.')
!undoAble.add()
!xDir = !this.orientation.val.xdir()
!yDir = !this.orientation.val.ydir()
!zDir = !this.orientation.val.zdir()
if (!zDir.string().split()[1].upcase().eq('D')) then
!sJus = 'UTOP'
!zOri = !zDir.opposite()
else
!sJus = 'UBOT'
!zOri = !zDir
endif
-- End Plate 1
NEW PANE
!paneRefe = !!ce
POSITION $!<this.gratingPos.val>
ORIENTATION $!<this.orientation.val>
NEW PLOO
HEIGHT $!<this.plHeight.val>
SJUSTIFICATION $!<sJus>
-- <1>
NEW PAVE
POSITION E 0 N 0 U 0
END
-- <2>
NEW PAVE
POSITION E $!<this.xLength.val> N 0 U 0
END
-- <3>
NEW PAVE
POSITION E $!<this.xLength.val> N $!
<this.plThick.val> U 0
END
-- <4>
NEW PAVE
POSITION E 0 N $!<this.plThick.val> U 0
END
END
END
-- End Plate 2
NEW PANE COPY $!<paneRefe> BY Y ($!<this.yLength.val>
- $!<this.plThick.val>) WRT CE
-- Bar Section
!spref = '/DESPAR-SPEC/Tube_with_design_parameters'
!possOffset = !this.gratingPos.val.offset(!yDir,!
this.pitchYdir.val).offset(!zOri,!this.plHeight.val - (!
this.rBarDia.val / 2))
!poseOffset = !possOffset.offset(!xDir,!
this.xLength.val)
NEW SCTN
!sctnRefe = !!ce
SPREF $!<spref>
DESP $!<this.rBarDia.val> ($!<this.rBarDia.val> /
2)
96
JUS NA
POSS $!<possOffset>
POSE $!<poseOffset>
DRNS PERP
DRNE PERP
END
!!ce = !sctnRefe
do !b from 1 to !yCopies.int()
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
enddo
if ((!yRemainder.real() * !this.pitchYdir.val) gt 10)
then
NEW SCTN COPY SAME MOVE $!<yDir> DISTANCE $!
<this.pitchYdir.val>
endif
END
-- Terminate Undo
!undoAble.endundoable()
97