It happens that it is necessary to check what the bending radius is equal to.
In the part attributes, this property is missing.
The PML comes to the rescue. To do this, we write the function.
define function !!bendradius(!bend is dbref) is real
!line = object line(!bend.ppos[1], !bend.ppos[2])
!lengthLine = !line.Length().ConvertUnits('mm')
!angle = 180 - !bend.pdir[1].angle(!bend.pdir[2]).ConvertUnits('degree').Value()
!sin = sin ( !angle / 2 )
!raduis = !lengthLine / ( 2 * !sin )
return !raduis
endfunction
How to find the radius?
All sources storage
In the part attributes, this property is missing.
The PML comes to the rescue. To do this, we write the function.
define function !!bendradius(!bend is dbref) is real
!line = object line(!bend.ppos[1], !bend.ppos[2])
!lengthLine = !line.Length().ConvertUnits('mm')
!angle = 180 - !bend.pdir[1].angle(!bend.pdir[2]).ConvertUnits('degree').Value()
!sin = sin ( !angle / 2 )
!raduis = !lengthLine / ( 2 * !sin )
return !raduis
endfunction
How to find the radius?
All sources storage
Комментариев нет:
Отправить комментарий
comments?