scriptup 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +11 -0
  3. data/README.md +5 -0
  4. data/ext/attribute_dictionaries.c +45 -0
  5. data/ext/attribute_dictionaries.h +3 -0
  6. data/ext/attribute_dictionary.c +156 -0
  7. data/ext/attribute_dictionary.h +3 -0
  8. data/ext/behavior.c +10 -0
  9. data/ext/behavior.h +3 -0
  10. data/ext/color.c +211 -0
  11. data/ext/color.h +3 -0
  12. data/ext/component_definition.c +188 -0
  13. data/ext/component_definition.h +3 -0
  14. data/ext/component_instance.c +10 -0
  15. data/ext/component_instance.h +3 -0
  16. data/ext/definition_list.c +145 -0
  17. data/ext/definition_list.h +3 -0
  18. data/ext/drawing_element.c +10 -0
  19. data/ext/drawing_element.h +3 -0
  20. data/ext/entities.c +11 -0
  21. data/ext/entities.h +3 -0
  22. data/ext/entity.c +253 -0
  23. data/ext/entity.h +3 -0
  24. data/ext/extconf.rb +38 -0
  25. data/ext/material.c +242 -0
  26. data/ext/material.h +3 -0
  27. data/ext/materials.c +80 -0
  28. data/ext/materials.h +3 -0
  29. data/ext/model.c +42 -0
  30. data/ext/model.h +3 -0
  31. data/ext/sketchup.c +89 -0
  32. data/ext/sketchup.h +4 -0
  33. data/ext/texture.c +9 -0
  34. data/ext/texture.h +3 -0
  35. data/ext/typed_value.c +84 -0
  36. data/ext/typed_value.h +5 -0
  37. data/ext/utils.h +80 -0
  38. data/lib/sketchup.rb +12 -0
  39. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/application.h +36 -0
  40. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/model.h +59 -0
  41. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/overlay.h +248 -0
  42. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/ruby_api.h +118 -0
  43. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/color.h +107 -0
  44. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/common.h +178 -0
  45. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/defs.h +19 -0
  46. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/extension_license.h +62 -0
  47. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/bounding_box.h +34 -0
  48. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/plane3d.h +153 -0
  49. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point2d.h +96 -0
  50. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point3d.h +98 -0
  51. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/ray3d.h +64 -0
  52. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/transformation.h +321 -0
  53. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/transformation2d.h +163 -0
  54. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector2d.h +235 -0
  55. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector3d.h +285 -0
  56. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry.h +152 -0
  57. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/modelexporterplugin.h +165 -0
  58. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/modelimporterplugin.h +183 -0
  59. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/pluginprogresscallback.h +84 -0
  60. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/initialize.h +43 -0
  61. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/length_formatter.h +424 -0
  62. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/arccurve.h +244 -0
  63. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/arrow_type.h +17 -0
  64. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/attribute_dictionary.h +161 -0
  65. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/axes.h +242 -0
  66. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/camera.h +398 -0
  67. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classification_attribute.h +89 -0
  68. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classification_info.h +125 -0
  69. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classifications.h +86 -0
  70. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_definition.h +588 -0
  71. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_instance.h +344 -0
  72. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/curve.h +143 -0
  73. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/defs.h +142 -0
  74. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension.h +222 -0
  75. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_linear.h +421 -0
  76. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_radial.h +194 -0
  77. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_style.h +253 -0
  78. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/drawing_element.h +198 -0
  79. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dynamic_component_attribute.h +92 -0
  80. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dynamic_component_info.h +70 -0
  81. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/edge.h +271 -0
  82. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/edge_use.h +214 -0
  83. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entities.h +834 -0
  84. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity.h +186 -0
  85. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity_list.h +80 -0
  86. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity_list_iterator.h +90 -0
  87. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/face.h +686 -0
  88. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/font.h +138 -0
  89. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/geometry.h +20 -0
  90. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/geometry_input.h +685 -0
  91. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/group.h +244 -0
  92. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/guide_line.h +155 -0
  93. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/guide_point.h +153 -0
  94. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/image.h +288 -0
  95. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/image_rep.h +275 -0
  96. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/instancepath.h +266 -0
  97. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/layer.h +265 -0
  98. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/layer_folder.h +301 -0
  99. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/line_style.h +211 -0
  100. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/line_styles.h +81 -0
  101. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/location.h +65 -0
  102. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/loop.h +182 -0
  103. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/material.h +390 -0
  104. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/mesh_helper.h +187 -0
  105. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model.h +1663 -0
  106. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model_version.h +49 -0
  107. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/opening.h +72 -0
  108. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/options_manager.h +79 -0
  109. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/options_provider.h +166 -0
  110. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/polyline3d.h +140 -0
  111. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/rendering_options.h +179 -0
  112. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/scene.h +836 -0
  113. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/schema.h +56 -0
  114. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/schema_type.h +26 -0
  115. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/section_plane.h +212 -0
  116. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/selection.h +156 -0
  117. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/shadow_info.h +147 -0
  118. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/skp.h +45 -0
  119. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/style.h +303 -0
  120. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/styles.h +190 -0
  121. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/text.h +384 -0
  122. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/texture.h +358 -0
  123. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/texture_writer.h +280 -0
  124. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/typed_value.h +390 -0
  125. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/uv_helper.h +79 -0
  126. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/vertex.h +154 -0
  127. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/sketchup.h +122 -0
  128. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/sketchup_info.h +65 -0
  129. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/slapi.h +16 -0
  130. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/transformation.h +16 -0
  131. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/unicodestring.h +239 -0
  132. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/utils/math_helpers.h +124 -0
  133. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonGeometry.dylib +0 -0
  134. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonGeoutils.dylib +0 -0
  135. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonImage.dylib +0 -0
  136. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonPreferences.dylib +0 -0
  137. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonUnits.dylib +0 -0
  138. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonUtils.dylib +0 -0
  139. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonZip.dylib +0 -0
  140. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Resources/Info.plist +50 -0
  141. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/SketchUpAPI +0 -0
  142. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/_CodeSignature/CodeResources +835 -0
  143. data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpAPI.dll +0 -0
  144. data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpAPI.lib +0 -0
  145. data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpCommonPreferences.dll +0 -0
  146. data/sketchup-sdk-win/binaries/sketchup/x64/sketchup.lib +0 -0
  147. data/sketchup-sdk-win/headers/SketchUpAPI/application/application.h +36 -0
  148. data/sketchup-sdk-win/headers/SketchUpAPI/application/model.h +59 -0
  149. data/sketchup-sdk-win/headers/SketchUpAPI/application/overlay.h +248 -0
  150. data/sketchup-sdk-win/headers/SketchUpAPI/application/ruby_api.h +118 -0
  151. data/sketchup-sdk-win/headers/SketchUpAPI/color.h +107 -0
  152. data/sketchup-sdk-win/headers/SketchUpAPI/common.h +178 -0
  153. data/sketchup-sdk-win/headers/SketchUpAPI/defs.h +19 -0
  154. data/sketchup-sdk-win/headers/SketchUpAPI/extension_license.h +62 -0
  155. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/bounding_box.h +34 -0
  156. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/plane3d.h +153 -0
  157. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point2d.h +96 -0
  158. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point3d.h +98 -0
  159. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/ray3d.h +64 -0
  160. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/transformation.h +321 -0
  161. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/transformation2d.h +163 -0
  162. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector2d.h +235 -0
  163. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector3d.h +285 -0
  164. data/sketchup-sdk-win/headers/SketchUpAPI/geometry.h +152 -0
  165. data/sketchup-sdk-win/headers/SketchUpAPI/import_export/modelexporterplugin.h +165 -0
  166. data/sketchup-sdk-win/headers/SketchUpAPI/import_export/modelimporterplugin.h +183 -0
  167. data/sketchup-sdk-win/headers/SketchUpAPI/import_export/pluginprogresscallback.h +84 -0
  168. data/sketchup-sdk-win/headers/SketchUpAPI/initialize.h +43 -0
  169. data/sketchup-sdk-win/headers/SketchUpAPI/length_formatter.h +424 -0
  170. data/sketchup-sdk-win/headers/SketchUpAPI/model/arccurve.h +244 -0
  171. data/sketchup-sdk-win/headers/SketchUpAPI/model/arrow_type.h +17 -0
  172. data/sketchup-sdk-win/headers/SketchUpAPI/model/attribute_dictionary.h +161 -0
  173. data/sketchup-sdk-win/headers/SketchUpAPI/model/axes.h +242 -0
  174. data/sketchup-sdk-win/headers/SketchUpAPI/model/camera.h +398 -0
  175. data/sketchup-sdk-win/headers/SketchUpAPI/model/classification_attribute.h +89 -0
  176. data/sketchup-sdk-win/headers/SketchUpAPI/model/classification_info.h +125 -0
  177. data/sketchup-sdk-win/headers/SketchUpAPI/model/classifications.h +86 -0
  178. data/sketchup-sdk-win/headers/SketchUpAPI/model/component_definition.h +588 -0
  179. data/sketchup-sdk-win/headers/SketchUpAPI/model/component_instance.h +344 -0
  180. data/sketchup-sdk-win/headers/SketchUpAPI/model/curve.h +143 -0
  181. data/sketchup-sdk-win/headers/SketchUpAPI/model/defs.h +142 -0
  182. data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension.h +222 -0
  183. data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_linear.h +421 -0
  184. data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_radial.h +194 -0
  185. data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_style.h +253 -0
  186. data/sketchup-sdk-win/headers/SketchUpAPI/model/drawing_element.h +198 -0
  187. data/sketchup-sdk-win/headers/SketchUpAPI/model/dynamic_component_attribute.h +92 -0
  188. data/sketchup-sdk-win/headers/SketchUpAPI/model/dynamic_component_info.h +70 -0
  189. data/sketchup-sdk-win/headers/SketchUpAPI/model/edge.h +271 -0
  190. data/sketchup-sdk-win/headers/SketchUpAPI/model/edge_use.h +214 -0
  191. data/sketchup-sdk-win/headers/SketchUpAPI/model/entities.h +834 -0
  192. data/sketchup-sdk-win/headers/SketchUpAPI/model/entity.h +186 -0
  193. data/sketchup-sdk-win/headers/SketchUpAPI/model/entity_list.h +80 -0
  194. data/sketchup-sdk-win/headers/SketchUpAPI/model/entity_list_iterator.h +90 -0
  195. data/sketchup-sdk-win/headers/SketchUpAPI/model/face.h +686 -0
  196. data/sketchup-sdk-win/headers/SketchUpAPI/model/font.h +138 -0
  197. data/sketchup-sdk-win/headers/SketchUpAPI/model/geometry.h +20 -0
  198. data/sketchup-sdk-win/headers/SketchUpAPI/model/geometry_input.h +685 -0
  199. data/sketchup-sdk-win/headers/SketchUpAPI/model/group.h +244 -0
  200. data/sketchup-sdk-win/headers/SketchUpAPI/model/guide_line.h +155 -0
  201. data/sketchup-sdk-win/headers/SketchUpAPI/model/guide_point.h +153 -0
  202. data/sketchup-sdk-win/headers/SketchUpAPI/model/image.h +288 -0
  203. data/sketchup-sdk-win/headers/SketchUpAPI/model/image_rep.h +275 -0
  204. data/sketchup-sdk-win/headers/SketchUpAPI/model/instancepath.h +266 -0
  205. data/sketchup-sdk-win/headers/SketchUpAPI/model/layer.h +265 -0
  206. data/sketchup-sdk-win/headers/SketchUpAPI/model/layer_folder.h +301 -0
  207. data/sketchup-sdk-win/headers/SketchUpAPI/model/line_style.h +211 -0
  208. data/sketchup-sdk-win/headers/SketchUpAPI/model/line_styles.h +81 -0
  209. data/sketchup-sdk-win/headers/SketchUpAPI/model/location.h +65 -0
  210. data/sketchup-sdk-win/headers/SketchUpAPI/model/loop.h +182 -0
  211. data/sketchup-sdk-win/headers/SketchUpAPI/model/material.h +390 -0
  212. data/sketchup-sdk-win/headers/SketchUpAPI/model/mesh_helper.h +187 -0
  213. data/sketchup-sdk-win/headers/SketchUpAPI/model/model.h +1663 -0
  214. data/sketchup-sdk-win/headers/SketchUpAPI/model/model_version.h +49 -0
  215. data/sketchup-sdk-win/headers/SketchUpAPI/model/opening.h +72 -0
  216. data/sketchup-sdk-win/headers/SketchUpAPI/model/options_manager.h +79 -0
  217. data/sketchup-sdk-win/headers/SketchUpAPI/model/options_provider.h +166 -0
  218. data/sketchup-sdk-win/headers/SketchUpAPI/model/polyline3d.h +140 -0
  219. data/sketchup-sdk-win/headers/SketchUpAPI/model/rendering_options.h +179 -0
  220. data/sketchup-sdk-win/headers/SketchUpAPI/model/scene.h +836 -0
  221. data/sketchup-sdk-win/headers/SketchUpAPI/model/schema.h +56 -0
  222. data/sketchup-sdk-win/headers/SketchUpAPI/model/schema_type.h +26 -0
  223. data/sketchup-sdk-win/headers/SketchUpAPI/model/section_plane.h +212 -0
  224. data/sketchup-sdk-win/headers/SketchUpAPI/model/selection.h +156 -0
  225. data/sketchup-sdk-win/headers/SketchUpAPI/model/shadow_info.h +147 -0
  226. data/sketchup-sdk-win/headers/SketchUpAPI/model/skp.h +45 -0
  227. data/sketchup-sdk-win/headers/SketchUpAPI/model/style.h +303 -0
  228. data/sketchup-sdk-win/headers/SketchUpAPI/model/styles.h +190 -0
  229. data/sketchup-sdk-win/headers/SketchUpAPI/model/text.h +384 -0
  230. data/sketchup-sdk-win/headers/SketchUpAPI/model/texture.h +358 -0
  231. data/sketchup-sdk-win/headers/SketchUpAPI/model/texture_writer.h +280 -0
  232. data/sketchup-sdk-win/headers/SketchUpAPI/model/typed_value.h +390 -0
  233. data/sketchup-sdk-win/headers/SketchUpAPI/model/uv_helper.h +79 -0
  234. data/sketchup-sdk-win/headers/SketchUpAPI/model/vertex.h +154 -0
  235. data/sketchup-sdk-win/headers/SketchUpAPI/sketchup.h +122 -0
  236. data/sketchup-sdk-win/headers/SketchUpAPI/sketchup_info.h +65 -0
  237. data/sketchup-sdk-win/headers/SketchUpAPI/slapi.h +16 -0
  238. data/sketchup-sdk-win/headers/SketchUpAPI/transformation.h +16 -0
  239. data/sketchup-sdk-win/headers/SketchUpAPI/unicodestring.h +239 -0
  240. data/sketchup-sdk-win/headers/SketchUpAPI/utils/math_helpers.h +124 -0
  241. metadata +313 -0
@@ -0,0 +1,165 @@
1
+ // Copyright 2012-2020 Trimble Inc. All Rights Reserved.
2
+
3
+ /**
4
+ * @file
5
+ * @brief Interfaces for SketchUpModelExporterInterface.
6
+ */
7
+ #ifndef MODELEXPORTERPLUGIN_H_
8
+ #define MODELEXPORTERPLUGIN_H_
9
+
10
+ #include <map>
11
+ #include <string>
12
+
13
+ #include <SketchUpAPI/import_export/pluginprogresscallback.h>
14
+
15
+ /**
16
+ @struct SketchUpModelExporterInterface
17
+ @brief A valid SketchUp "exporter" plugin must support the following interface.
18
+ See the SDK samples for an example.
19
+ */
20
+ class SketchUpModelExporterInterface {
21
+ public:
22
+ /**
23
+ @brief Returns a unique ASCII (non-localized) identifier for the exporter.
24
+ For example, all SketchUp supplied exporters use the following
25
+ convention for the id name: com.sketchup.exporters.extension. This id
26
+ is used to identify the current default exporter and saved between
27
+ invocations of SketchUp.
28
+ @return
29
+ - A unique string identifier for the plugin
30
+ */
31
+ virtual std::string GetIdentifier() const = 0;
32
+
33
+ /**
34
+ @brief The number of extensions supported by the exporter. Must be > 0.
35
+ @return
36
+ - The number of file extensions supported by this plugin
37
+ */
38
+ virtual int GetFileExtensionCount() const = 0;
39
+
40
+ /**
41
+ @brief Each extension, assumed to be ASCII and case independent with no
42
+ leading dot.
43
+ @param[in] index The index of the extension
44
+ @return
45
+ - The file extension retrieved
46
+ */
47
+ virtual std::string GetFileExtension(int index) const = 0;
48
+
49
+ /**
50
+ @brief Return a brief description of the exporter for the file drop down box
51
+ which may be extension specific. For example you may return "AutoCAD
52
+ DWG Files" corresponding to the dwg extension and "AutoCAD DXF Files"
53
+ corresponding to the dxf extension. Each extension and description pair
54
+ will be entered into the exporter drop down list as a separate entry.
55
+ @param[in] index The index of the extension
56
+ @return
57
+ - The description retrieved
58
+ */
59
+ virtual std::string GetDescription(int index) const = 0;
60
+
61
+
62
+ /**
63
+ @brief Indicates whether the exporter supports an options dialog.
64
+ @return
65
+ - true if the exporter supports an options dialog. If so, the "Options" button
66
+ will be enabled when your exporter is chosen, and selecting that button will
67
+ call the exporter's ShowOptionsDialog method.
68
+ */
69
+ virtual bool SupportsOptions() const {
70
+ return false;
71
+ }
72
+
73
+ /**
74
+ @brief Displays a modal dialog which controls options supported by the
75
+ exporter. Implementing this is required if SupportOptions is true.
76
+ Options should be saved someplace which persists between this method
77
+ and ConvertFromSkp as well as between sessions.
78
+ @param[in] model_has_selection Indicates if the model has a current selection
79
+ set. May be used in concert with ExportSelectionSetOnly to allow
80
+ the exporter to export just the selected portion of the model.
81
+ For example, you may enable a check box which controls this and
82
+ return the state of that check box from ExportSelectionSetOnly.
83
+ */
84
+ virtual void ShowOptionsDialog(bool model_has_selection) {
85
+ }
86
+
87
+ /**
88
+ @brief Indicates whether the plugin supports exporting just the selection.
89
+ @return
90
+ - true if the exporter supports an option to just export the selection AND the
91
+ user has set that to true. If true, SketchUp will save the selected portion
92
+ of the model and pass that into the ConvertFromSkp method.
93
+ */
94
+ virtual bool ExportSelectionSetOnly() {
95
+ return false;
96
+ }
97
+
98
+ /**
99
+ @brief Indicates whether the plugin supports the progress callback.
100
+ @return
101
+ - true if the exporter supports the progress callback. If true, the plugin
102
+ should periodically update the status with messages and percent complete
103
+ as well as check if the user pressed the cancel button. If false, SketchUp
104
+ will provide limited feedback on the progress of the export step.
105
+ */
106
+ virtual bool SupportsProgress() const {
107
+ return true;
108
+ }
109
+
110
+ /**
111
+ @brief Performs the conversion from a temporary skp file to the target output
112
+ file using options set during the ShowOptionsDialog method.
113
+ @param[in] input_skp Either a saved version of the current model or the
114
+ current selection (if ExportSelectionSetOnly returns
115
+ true). The method should read this file and convert to
116
+ the output file. The file name is specified in UTF-8 and
117
+ may require conversion to a platform-dependent format
118
+ (i.e. UTF-16) for proper support of international file
119
+ names.
120
+ @param[in] output The requested output file in UTF-8.
121
+ @param[in] progress The exporter should support this progress interface. See
122
+ that for details. The method should be tolerant to a NULL
123
+ progress callback.
124
+ @param[in] reserved Reserved for internal use.
125
+ @return
126
+ - true on success
127
+ - false on failure or cancellation
128
+ */
129
+ virtual bool ConvertFromSkp(
130
+ const std::string& input_skp, const std::string& output,
131
+ SketchUpPluginProgressCallback* progress, void* reserved) = 0;
132
+ /**
133
+ @brief Displays a modal dialog showing an optional summary of the export
134
+ process. The default does nothing. Note that Ruby scripting often
135
+ disables this dialog.
136
+ */
137
+ virtual void ShowSummaryDialog() {
138
+ }
139
+ };
140
+
141
+ ////////////////////////////////////////////////////////////////////////////////
142
+
143
+ #ifdef __OBJC__
144
+ #import <Foundation/Foundation.h>
145
+ /** Each Mac plugin should support this simple protocol.
146
+ */
147
+ @protocol SketchUpModelExporterPlugin<NSObject>
148
+ /**
149
+ @brief Returns an auto-released instance of the exporter.
150
+ */
151
+ + (id<SketchUpModelExporterPlugin>)exporter;
152
+
153
+ /**
154
+ @brief This returns our c++ interface from the obj-c wrapper.
155
+ */
156
+ - (SketchUpModelExporterInterface*)sketchUpModelExporterInterface;
157
+ @end
158
+
159
+ #else
160
+ /**
161
+ * Each Windows DLL should export a function which returns the C++ interface.
162
+ */
163
+ typedef SketchUpModelExporterInterface* (*GetSketchUpModelExporterInterfaceFunc)(void);
164
+ #endif
165
+ #endif // MODELEXPORTERPLUGIN_H_
@@ -0,0 +1,183 @@
1
+ // Copyright 2012-2020 Trimble, Inc. All Rights Reserved.
2
+
3
+ /**
4
+ * @file
5
+ * @brief Interfaces for SketchUpModelImporterInterface.
6
+ */
7
+ #ifndef MODELIMPORTERPLUGIN_H_
8
+ #define MODELIMPORTERPLUGIN_H_
9
+
10
+ #include <string>
11
+
12
+ #include <SketchUpAPI/import_export/pluginprogresscallback.h>
13
+
14
+ /** @brief Return type of SketchUpOptionsDialogResponse::ShowOptionsDialog(). */
15
+ enum SketchUpOptionsDialogResponse {
16
+ IMPORTER_OPTIONS_UNAVAILABLE = 0, ///< Importer options not available.
17
+ IMPORTER_OPTIONS_CANCELLED = 1, ///< Importer options cancelled.
18
+ IMPORTER_OPTIONS_ACCEPTED = 2 ///< Importer options accepted.
19
+ };
20
+
21
+ /** Return type of GetImporterBehavior(). */
22
+ enum SketchUpModelImporterBehavior {
23
+ IMPORT_MODEL_AT_ORIGIN = 0, ///< Preserves coordinates of the imported
24
+ ///< geometry.
25
+ IMPORT_MODEL_AS_COMPONENT = 1, ///< Model gets imported as a selected
26
+ ///< component with the move tool activated.
27
+ ///< New Sketchup 2017 import behaviors.
28
+ IMPORT_MODEL_PRESERVE_ORIGIN = IMPORT_MODEL_AT_ORIGIN, ///< Same as
29
+ ///< IMPORT_MODEL_AT_ORIGIN.
30
+ IMPORT_MODEL_RESET_ORIGIN_TO_BBOX_MIN = 2 ///< Translates the coordinates of
31
+ ///< the imported geometry such
32
+ ///< that the minimum point of the
33
+ ///< bounding box is at the origin.
34
+ };
35
+
36
+ /**
37
+ @struct SketchUpModelImporterInterface
38
+ @brief A valid SketchUp "importer" plugin must support the following interface.
39
+ See the SDK samples for an example.
40
+ */
41
+ class SketchUpModelImporterInterface {
42
+ public:
43
+ /**
44
+ @brief Returns a unique ASCII (non-localized) identifier for the importer.
45
+ For example, all SketchUp supplied importers use the following
46
+ convention for the id name: com.sketchup.importers.extension.
47
+ This id is used to identify the current default importer and
48
+ saved between invocations of SketchUp.
49
+ @return
50
+ - A unique string identifier for the plugin
51
+ */
52
+ virtual std::string GetIdentifier() const = 0;
53
+
54
+ /**
55
+ @brief The number of extensions supported by the importer. Must be > 0.
56
+ @return
57
+ - The number of file extensions supported by this plugin
58
+ */
59
+ virtual int GetFileExtensionCount() const = 0;
60
+
61
+ /**
62
+ @brief Each extension, assumed to be ASCII and case independent with no
63
+ leading dot.
64
+ @param[in] index The index of the extension
65
+ @return
66
+ - The file extension retrieved
67
+ */
68
+ virtual std::string GetFileExtension(int index) const = 0;
69
+
70
+ /**
71
+ @brief Return a brief description of the importer for the file drop down
72
+ box. For example, "AutoCAD DWG Files". SketchUp uses this description
73
+ together with all the extensions to form a single entry in the import
74
+ dialog drop down list: e.g., "AutoCAD DWG Files (*.dwg,*.dxf)"
75
+ @return
76
+ - The description retrieved
77
+ */
78
+ virtual std::string GetDescription() const = 0;
79
+
80
+ /**
81
+ @brief Indicates whether the importer supports an options dialog.
82
+ @return
83
+ - true if the importer supports an options dialog. If so, the "Options" button
84
+ will be enabled when your importer is chosen, and selecting that button will
85
+ call the importer's ShowOptionsDialog method.
86
+ */
87
+ virtual bool SupportsOptions() const {
88
+ return false;
89
+ }
90
+
91
+ /**
92
+ @brief Displays a modal dialog which controls options supported by the
93
+ importer. Implementing this is required if SupportOptions is true.
94
+ Options should be saved someplace which persists between this method
95
+ and ConvertToSkp as well as between sessions.
96
+ @warning *** Breaking Change: The behavior of this method was changed in
97
+ SketchUp 2019.2, API 7.1 on the Windows API and SketchUp 2020, API 8.0
98
+ on the MacOS API. In previous releases, the method returned void. Now
99
+ it will return \ref SketchUpOptionsDialogResponse.
100
+ @return SketchUpOptionsDialogResponse
101
+ IMPORTER_OPTIONS_UNAVAILABLE if unable to display options,
102
+ IMPORTER_OPTIONS_CANCELLED if options were cancelled,
103
+ IMPORTER_OPTIONS_ACCEPTED if options were accepted
104
+
105
+ */
106
+ virtual SketchUpOptionsDialogResponse ShowOptionsDialog() {
107
+ return IMPORTER_OPTIONS_UNAVAILABLE;
108
+ }
109
+
110
+ /**
111
+ @brief Indicates whether the plugin supports the progress callback.
112
+ @return
113
+ - true if the exporter supports the progress callback. If true, the plugin
114
+ should periodically update the status with messages and percent complete
115
+ as well as check if the user pressed the cancel button. If false, SketchUp
116
+ will provide limited feedback on the progress of the export step.
117
+ */
118
+ virtual bool SupportsProgress() const {
119
+ return true;
120
+ }
121
+
122
+ /**
123
+ @brief This performs the conversion from the selected input file to the
124
+ given temporary output file using options set during the
125
+ ShowOptionsDialog method. The output file is then inserted into
126
+ the current model using rules defined by the GetImporterBehavior
127
+ method.
128
+ @param[in] input The user selected input file. The file
129
+ name is specified in UTF-8 and may
130
+ require conversion to a platform
131
+ dependent format (i.e. UTF-16) for proper
132
+ support of international file names.
133
+ @param[in] output_skp A temporary output file in UTF-8.
134
+ @param[in] progress The importer should support this progress
135
+ interface. See that for details. The
136
+ method should be tolerant to a NULL
137
+ progress callback.
138
+ @param reserved Reserved for internal use.
139
+ @return
140
+ - true on success
141
+ - false on failure or cancellation
142
+ */
143
+ virtual bool ConvertToSkp(
144
+ const std::string& input, const std::string& output_skp,
145
+ SketchUpPluginProgressCallback* progress, void* reserved) = 0;
146
+ /**
147
+ @brief Displays a modal dialog showing an optional summary of the import
148
+ process. The default does nothing. Note that Ruby scripting often
149
+ disables this dialog.
150
+ */
151
+ virtual void ShowSummaryDialog() {
152
+ }
153
+ /**
154
+ @brief Defines the method SketchUp uses when placing the imported model.
155
+ */
156
+ virtual SketchUpModelImporterBehavior GetImporterBehavior() const {
157
+ return IMPORT_MODEL_PRESERVE_ORIGIN;
158
+ }
159
+
160
+ };
161
+
162
+ #ifdef __OBJC__
163
+ /** Each Mac plugin should support this simple protocol.
164
+ */
165
+ @protocol SketchUpModelImporterPlugin<NSObject>
166
+ /**
167
+ @brief Returns an auto-released instance of the importer.
168
+ */
169
+ + (id<SketchUpModelImporterPlugin>)importer;
170
+
171
+ /**
172
+ @brief This returns our c++ interface from the obj-c wrapper.
173
+ */
174
+ // This grabs our c++ interface from the obj-c wrapper.
175
+ - (SketchUpModelImporterInterface*)sketchUpModelImporterInterface;
176
+ @end
177
+
178
+ #else
179
+ /** Each Windows DLL should export a function which returns the c++ interface.
180
+ */
181
+ typedef SketchUpModelImporterInterface* (*GetSketchUpModelImporterInterfaceFunc)(void);
182
+ #endif
183
+ #endif // MODELIMPORTERPLUGIN_H_
@@ -0,0 +1,84 @@
1
+ // Copyright 2013-2020 Trimble Inc. All Rights Reserved.
2
+
3
+ /**
4
+ * @file
5
+ * @brief Interfaces for import/export progress feedback and cancellation.
6
+ */
7
+ #ifndef SKETCHUPPLUGINPROGRESSCALLBACK_H_
8
+ #define SKETCHUPPLUGINPROGRESSCALLBACK_H_
9
+
10
+ #include <string>
11
+
12
+ /**
13
+ @struct SketchUpPluginProgressCallback
14
+ @brief Interface to provide import/export progress feedback and cancellation.
15
+
16
+ All well behaved SketchUp importer/exporter plugins should support progress
17
+ feedback and cancellation through this interface. SketchUp will pop up a
18
+ progress/cancel dialog prior to calling the appropriate Convert method on the
19
+ importer/exporter plugin and supply a concrete implementation of this interface.
20
+ The plugin should supply feedback to the user by estimating how far along the
21
+ conversion is (via SetPercentDone or SetStepSize and Step), provide some textual
22
+ progress (via SetProgressMessage) and test for cancellation by calling
23
+ HasBeenCancelled.
24
+
25
+ For example, the main loop of an importer plugin may look like this:
26
+
27
+ \code{.cpp}
28
+ progress_callback->SetProgressMessage("Importing 50 things!");
29
+ progress_callback->SetStepSize(1.0);
30
+ for (int steps = 0; steps < 50; ++steps) {
31
+ progress_callback->Step();
32
+ // Do something which builds an skp model
33
+ if (progress_callback->HasBeenCancelled()) {
34
+ // Clean up and return
35
+ return false;
36
+ }
37
+ }
38
+ progress_callback->SetProgressMessage("We're half way there!");
39
+ // Do some more larger steps
40
+ progress_callback->SetPercentDone(75.0);
41
+ progress_callback->SetProgressMessage("Finishing up!");
42
+ // And some more
43
+ progress_callback->SetPercentDone(100.0);
44
+ // Success!
45
+ return true;
46
+ \endcode
47
+
48
+ */
49
+ class SketchUpPluginProgressCallback {
50
+ public:
51
+ /**
52
+ @brief Call this to test if the user has pressed the cancel button. Your
53
+ code should clean up and return promptly after detecting this.
54
+ @return Returns true if the user has pressed cancel.
55
+ */
56
+ virtual bool HasBeenCancelled() = 0;
57
+
58
+ /**
59
+ @brief Call this to set the percent complete on the dialog.
60
+ @param[in] percent The percent done from 0 to 100.
61
+ */
62
+ virtual void SetPercentDone(double percent) = 0;
63
+
64
+ /**
65
+ @brief You may also set a step size and increment it using the Step method.
66
+ @param[in] percent The percent to increment with each call to Step.
67
+ */
68
+ virtual void SetStepSize(double percent) = 0;
69
+
70
+ /**
71
+ @brief Increments the progress dialog by the step size set using
72
+ SetStepSize.
73
+ */
74
+ virtual void Step() = 0;
75
+
76
+ /**
77
+ @brief Supplies a UTF-8 message which will be presented on the progress
78
+ dialog.
79
+ @param utf8_message The message.
80
+ */
81
+ virtual void SetProgressMessage(const std::string& utf8_message) = 0;
82
+ };
83
+
84
+ #endif // SKETCHUPPLUGINPROGRESSCALLBACK_H_
@@ -0,0 +1,43 @@
1
+ // Copyright 2013-2020 Trimble Inc. All Rights Reserved
2
+
3
+ /**
4
+ * @file
5
+ * @brief Functionality for the API interface itself.
6
+ */
7
+ #ifndef SKETCHUP_INITIALIZE_H_
8
+ #define SKETCHUP_INITIALIZE_H_
9
+
10
+ #include <SketchUpAPI/common.h>
11
+
12
+ #ifdef __cplusplus
13
+ extern "C" {
14
+ #endif
15
+
16
+ /**
17
+ @brief Initializes the slapi interface. Must be called before calling any other
18
+ API function.
19
+ @attention This function should not be used from the Live API.
20
+ */
21
+ SU_EXPORT void SUInitialize();
22
+
23
+ /**
24
+ @brief Signals termination of use of the slapi interface. Must be called when
25
+ done using API functions.
26
+ @attention This function should not be used from the Live API.
27
+ */
28
+ SU_EXPORT void SUTerminate();
29
+
30
+ /**
31
+ @brief Returns the major and minor API version numbers.
32
+ @param[out] major The major version number retrieved.
33
+ @param[out] minor The minor version number retrieved.
34
+ @note This function hasn't reliably reported the correct versions prior to
35
+ version 8.2 of the SDK.
36
+ */
37
+ SU_EXPORT void SUGetAPIVersion(size_t* major, size_t* minor);
38
+
39
+ #ifdef __cplusplus
40
+ } // extern "C" {
41
+ #endif
42
+
43
+ #endif // SKETCHUP_INITIALIZE_H_