Simulation Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

73 lines
2.4 KiB

  1. <<<<<<< HEAD
  2. module CPathGeneration
  3. use SimulationVariables !@
  4. use json_module
  5. implicit none
  6. public
  7. contains
  8. subroutine PathGenerationToJson(parent)
  9. type(json_value),pointer :: parent
  10. type(json_core) :: json
  11. type(json_value),pointer :: ppath,pitems,pdp,p
  12. integer::i
  13. ! 1. create new node
  14. call json%create_object(ppath,'Path')
  15. call json%create_array(pitems,'Items')
  16. do i=1,data%Configuration%Path%ItemCount
  17. call json%create_object(p,'')
  18. call json%add(p,"HoleType",data%Configuration%Path%items(i)%HoleType)
  19. call json%add(p,"Angle",data%Configuration%Path%items(i)%Angle)
  20. call json%add(p,"Length",data%Configuration%Path%items(i)%Length)
  21. call json%add(p,"FinalAngle",data%Configuration%Path%items(i)%FinalAngle)
  22. call json%add(p,"TotalLength",data%Configuration%Path%items(i)%TotalLength)
  23. call json%add(p,"MeasuredDepth",data%Configuration%Path%items(i)%MeasuredDepth)
  24. call json%add(p,"TotalVerticalDepth",data%Configuration%Path%items(i)%TotalVerticalDepth)
  25. call json%add(pitems,p)
  26. end do
  27. call json%create_array(pdp,'DataPoints')
  28. do i=1,data%Configuration%Path%DataPointsCount
  29. call json%create_object(p,'')
  30. call json%add(p,"X",data%Configuration%Path%DataPoints(i)%X)
  31. call json%add(p,"Y",data%Configuration%Path%DataPoints(i)%Y)
  32. call json%add(pdp,p)
  33. end do
  34. ! 3. add new node to parent
  35. call json%add(ppath,pitems)
  36. call json%add(ppath,pdp)
  37. call json%add(parent,ppath)
  38. end subroutine
  39. =======
  40. module CPathGeneration
  41. use SimulationVariables !@
  42. use json_module
  43. implicit none
  44. public
  45. contains
  46. subroutine PathGenerationToJson(parent)
  47. type(json_value),pointer :: parent
  48. type(json_core) :: json
  49. type(json_value),pointer :: p
  50. ! 1. create new node
  51. call json%create_object(p,'Path')
  52. ! 2. add member of data type to new node
  53. ! call StringConfigurationToJson(p)
  54. ! call FormationToJson(p)
  55. ! call json%add(p,"",data%Configuration%Formation%Formations(i)%Abrasiveness)
  56. ! 3. add new node to parent
  57. call json%add(parent,p)
  58. end subroutine
  59. >>>>>>> 12c8e5ea51ec0ab746d971224588f794381f80d2
  60. end module CPathGeneration