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,222 @@
1
+ // Copyright 2016 Trimble Inc. All Rights Reserved.
2
+
3
+ /**
4
+ * @file
5
+ * @brief Interfaces for SUDimensionRef.
6
+ */
7
+ #ifndef SKETCHUP_MODEL_DIMENSION_H_
8
+ #define SKETCHUP_MODEL_DIMENSION_H_
9
+
10
+ #include <SketchUpAPI/color.h>
11
+ #include <SketchUpAPI/geometry.h>
12
+ #include <SketchUpAPI/unicodestring.h>
13
+ #include <SketchUpAPI/model/defs.h>
14
+ #include <SketchUpAPI/model/arrow_type.h>
15
+
16
+ #ifdef __cplusplus
17
+ extern "C" {
18
+ #endif
19
+
20
+ /**
21
+ @struct SUDimensionRef
22
+ @extends SUDrawingElementRef
23
+ @brief A dimension entity reference.
24
+ @since SketchUp 2017, API 5.0
25
+ */
26
+
27
+ /**
28
+ @enum SUDimensionType
29
+ @brief Indicates the supported dimension types
30
+ */
31
+ enum SUDimensionType {
32
+ SUDimensionType_Invalid = 0,
33
+ SUDimensionType_Linear,
34
+ SUDimensionType_Radial
35
+ };
36
+
37
+ /**
38
+ @brief Converts from an \ref SUDimensionRef to an \ref SUEntityRef. This is
39
+ essentially an upcast operation.
40
+ @since SketchUp 2017, API 5.0
41
+ @param[in] dimension The given dimension reference.
42
+ @related SUDimensionRef
43
+ @return
44
+ - The converted \ref SUEntityRef if dimension is a valid object
45
+ - If not, the returned reference will be invalid
46
+ */
47
+ SU_EXPORT SUEntityRef SUDimensionToEntity(SUDimensionRef dimension);
48
+
49
+ /**
50
+ @brief Converts from an SUEntityRef to an \ref SUDimensionRef. This is
51
+ essentially a downcast operation so the given SUEntityRef must be
52
+ convertible to an \ref SUDimensionRef.
53
+ @since SketchUp 2017, API 5.0
54
+ @param[in] entity The given entity reference.
55
+ @related SUDimensionRef
56
+ @return
57
+ - The converted \ref SUDimensionRef if the downcast operation succeeds
58
+ - If not, the returned reference will be invalid
59
+ */
60
+ SU_EXPORT SUDimensionRef SUDimensionFromEntity(SUEntityRef entity);
61
+
62
+ /**
63
+ @brief Converts from an \ref SUDimensionRef to an \ref SUDrawingElementRef.
64
+ This is essentially an upcast operation.
65
+ @since SketchUp 2017, API 5.0
66
+ @param[in] dimension The given dimension reference.
67
+ @related SUDimensionRef
68
+ @return
69
+ - The converted \ref SUDrawingElementRef if dimension is a valid object
70
+ - If not, the returned reference will be invalid
71
+ */
72
+ SU_EXPORT SUDrawingElementRef SUDimensionToDrawingElement(SUDimensionRef dimension);
73
+
74
+ /**
75
+ @brief Converts from an SUDrawingElementRef to an \ref SUDimensionRef. This is
76
+ essentially a downcast operation so the given SUDrawingElementRef must
77
+ be convertible to an \ref SUDimensionRef.
78
+ @since SketchUp 2017, API 5.0
79
+ @param[in] element The given drawing element reference.
80
+ @related SUDimensionRef
81
+ @return
82
+ - The converted \ref SUDimensionRef if the downcast operation succeeds
83
+ - If not, the returned reference will be invalid
84
+ */
85
+ SU_EXPORT SUDimensionRef SUDimensionFromDrawingElement(SUDrawingElementRef element);
86
+
87
+ /**
88
+ @brief Retrieves an enum value indicating the dimension type (linear or radial).
89
+ @since SketchUp 2017, API 5.0
90
+ @param[in] dimension The dimension object.
91
+ @param[out] type The dimension type enum value retrieved.
92
+ @related SUDimensionRef
93
+ @return
94
+ - \ref SU_ERROR_NONE on success
95
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
96
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if type is NULL
97
+ */
98
+ SU_RESULT SUDimensionGetType(SUDimensionRef dimension, enum SUDimensionType* type);
99
+
100
+ /**
101
+ @brief Retrieves the text of a dimension object.
102
+ @since SketchUp 2017, API 5.0
103
+ @param[in] dimension The dimension object.
104
+ @param[out] text The name retrieved.
105
+ @related SUDimensionRef
106
+ @return
107
+ - \ref SU_ERROR_NONE on success
108
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
109
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if text is NULL
110
+ - \ref SU_ERROR_INVALID_OUTPUT if text does not point to a valid \ref
111
+ SUStringRef object
112
+ */
113
+ SU_RESULT SUDimensionGetText(SUDimensionRef dimension, SUStringRef* text);
114
+
115
+ /**
116
+ @brief Sets the text of a dimension object.
117
+ @since SketchUp 2017, API 5.0
118
+ @param[in] dimension The dimension object.
119
+ @param[in] text The text to be set. Assumed to be UTF-8 encoded.
120
+ @related SUDimensionRef
121
+ @return
122
+ - \ref SU_ERROR_NONE on success
123
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
124
+ - \ref SU_ERROR_NULL_POINTER_INPUT if text is NULL
125
+ */
126
+ SU_RESULT SUDimensionSetText(SUDimensionRef dimension, const char* text);
127
+
128
+ /**
129
+ @brief Retrieves the plane of a dimension object.
130
+ @since SketchUp 2017, API 5.0
131
+ @param[in] dimension The dimension object.
132
+ @param[out] plane The 3d plane retrieved.
133
+ @related SUDimensionRef
134
+ @return
135
+ - \ref SU_ERROR_NONE on success
136
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
137
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if plane is NULL
138
+ */
139
+ SU_RESULT SUDimensionGetPlane(SUDimensionRef dimension, struct SUPlane3D* plane);
140
+
141
+ /**
142
+ @brief Retrieves a boolean indicating if the dimension text is 3D.
143
+ @since SketchUp 2017, API 5.0
144
+ @param[in] dimension The dimension object.
145
+ @param[out] is_text_3d The flag value retrieved.
146
+ @related SUDimensionRef
147
+ @return
148
+ - \ref SU_ERROR_NONE on success
149
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
150
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if is_text_3d is NULL
151
+ */
152
+ SU_RESULT SUDimensionGetText3D(SUDimensionRef dimension, bool* is_text_3d);
153
+
154
+ /**
155
+ @brief Sets a boolean indicating whether the dimension text is 3D.
156
+ @since SketchUp 2017, API 5.0
157
+ @param[in] dimension The dimension object.
158
+ @param[in] is_text_3d The flag to be set.
159
+ @related SUDimensionRef
160
+ @return
161
+ - \ref SU_ERROR_NONE on success
162
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
163
+ */
164
+ SU_RESULT SUDimensionSetText3D(SUDimensionRef dimension, bool is_text_3d);
165
+
166
+ /**
167
+ @brief Retrieves an enum value indicating the dimension's arrow type.
168
+ @since SketchUp 2017, API 5.0
169
+ @param[in] dimension The dimension object.
170
+ @param[out] type The arrow type enum value retrieved.
171
+ @related SUDimensionRef
172
+ @return
173
+ - \ref SU_ERROR_NONE on success
174
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
175
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if type is NULL
176
+ */
177
+ SU_RESULT SUDimensionGetArrowType(SUDimensionRef dimension, enum SUArrowType* type);
178
+
179
+ /**
180
+ @brief Sets the dimension's arrow type.
181
+ @since SketchUp 2017, API 5.0
182
+ @param[in] dimension The dimension object.
183
+ @param[in] type The arrow type to be set.
184
+ @related SUDimensionRef
185
+ @return
186
+ - \ref SU_ERROR_NONE on success
187
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
188
+ - \ref SU_ERROR_OUT_OF_RANGE if type is not a supported value
189
+ */
190
+ SU_RESULT SUDimensionSetArrowType(SUDimensionRef dimension, enum SUArrowType type);
191
+
192
+ /**
193
+ @brief Get the dimension's font reference.
194
+ @since SketchUp 2019, API 7.0
195
+ @param[in] dimension The dimension object.
196
+ @param[out] font The font retrieved.
197
+ @related SUDimensionRef
198
+ @return
199
+ - \ref SU_ERROR_NONE on success
200
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
201
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if font is NULL
202
+ */
203
+ SU_RESULT SUDimensionGetFont(SUDimensionRef dimension, SUFontRef* font);
204
+
205
+ /**
206
+ @brief Sets the dimension's font from a font reference.
207
+ @since SketchUp 2019, API 7.0
208
+ @param[in] dimension The dimension object.
209
+ @param[in] font The font to be set.
210
+ @related SUDimensionRef
211
+ @return
212
+ - \ref SU_ERROR_NONE on success
213
+ - \ref SU_ERROR_INVALID_INPUT if dimension or font is not a valid object
214
+ - \ref SU_ERROR_NULL_POINTER_INPUT if font is NULL
215
+ */
216
+ SU_RESULT SUDimensionSetFont(SUDimensionRef dimension, SUFontRef font);
217
+
218
+ #ifdef __cplusplus
219
+ } // extern "C"
220
+ #endif
221
+
222
+ #endif // SKETCHUP_MODEL_DIMENSION_H_
@@ -0,0 +1,421 @@
1
+ // Copyright 2016 Trimble Inc. All Rights Reserved.
2
+
3
+ /**
4
+ * @file
5
+ * @brief Interfaces for SUDimensionLinearRef.
6
+ */
7
+ #ifndef SKETCHUP_MODEL_DIMENSION_LINEAR_H_
8
+ #define SKETCHUP_MODEL_DIMENSION_LINEAR_H_
9
+
10
+ #include <SketchUpAPI/geometry.h>
11
+ #include <SketchUpAPI/model/defs.h>
12
+
13
+ #ifdef __cplusplus
14
+ extern "C" {
15
+ #endif
16
+
17
+ /**
18
+ @struct SUDimensionLinearRef
19
+ @extends SUDimensionRef
20
+ @brief A linear dimension entity reference.
21
+ @since SketchUp 2017, API 5.0
22
+ */
23
+
24
+ /**
25
+ @enum SUHorizontalTextPositionType
26
+ @brief Indicates the different supported horizontal text position types
27
+ @since SketchUp 2017, API 5.0
28
+ */
29
+ enum SUHorizontalTextPositionType {
30
+ SUHorizontalTextPositionCenter = 0,
31
+ SUHorizontalTextPositionOutsideStart,
32
+ SUHorizontalTextPositionOutsideEnd
33
+ };
34
+
35
+ /**
36
+ @enum SUVerticalTextPositionType
37
+ @brief Indicates the different supported horizontal text position types
38
+ @since SketchUp 2017, API 5.0
39
+ */
40
+ enum SUVerticalTextPositionType {
41
+ SUVerticalTextPositionCenter = 0,
42
+ SUVerticalTextPositionAbove,
43
+ SUVerticalTextPositionBelow
44
+ };
45
+
46
+ /**
47
+ @enum SUDimensionLinearAlignmentType
48
+ @brief Indicates the different supported horizontal text position types
49
+ @since SketchUp 2019, API 7.0
50
+ */
51
+ enum SUDimensionLinearAlignmentType {
52
+ SUDimensionLinearAlignmentAligned = 0,
53
+ SUDimensionLinearAlignmentVertical,
54
+ SUDimensionLinearAlignmentHorizontal
55
+ };
56
+
57
+ /**
58
+ @brief Converts from an \ref SUDimensionLinearRef to an \ref SUDimensionRef.
59
+ This is essentially an upcast operation.
60
+ @since SketchUp 2017, API 5.0
61
+ @param[in] dimension The given dimension reference.
62
+ @related SUDimensionLinearRef
63
+ @return
64
+ - The converted \ref SUDimensionRef if dimension is a valid object
65
+ - If not, the returned reference will be invalid
66
+ */
67
+ SU_EXPORT SUDimensionRef SUDimensionLinearToDimension(SUDimensionLinearRef dimension);
68
+
69
+ /**
70
+ @brief Converts from an \ref SUDimensionRef to an \ref SUDimensionLinearRef.
71
+ This is essentially a downcast operation so the given \ref
72
+ SUDimensionRef must be convertible to an \ref SUDimensionLinearRef.
73
+ @since SketchUp 2017, API 5.0
74
+ @param[in] dimension The given dimension reference.
75
+ @related SUDimensionLinearRef
76
+ @return
77
+ - The converted \ref SUDimensionLinearRef if the downcast operation succeeds
78
+ - If not, the returned reference will be invalid
79
+ */
80
+ SU_EXPORT SUDimensionLinearRef SUDimensionLinearFromDimension(SUDimensionRef dimension);
81
+
82
+ /**
83
+ @brief Creates a new linear dimension object with default data. Refer to the
84
+ documentation for \ref SUDimensionLinearSetStartPoint() for more
85
+ information about the various supported ways for setting connection
86
+ points.
87
+ @since SketchUp 2017, API 5.0
88
+ @param[out] dimension The dimension object created.
89
+ @param[in] start_point The 3d point used to set the start location.
90
+ @param[in] start_path The instance path used to specify the entity connected
91
+ to the dimension's start.
92
+ @param[in] end_point The 3d point used to set the end location.
93
+ @param[in] end_path The instance path used to specify the entity connected
94
+ to the dimension's end.
95
+ @param[in] offset The offset distance from the measured entities to be
96
+ set.
97
+ @related SUDimensionLinearRef
98
+ @return
99
+ - \ref SU_ERROR_NONE on success
100
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if dimension is NULL
101
+ - \ref SU_ERROR_OVERWRITE_VALID if dimension already references a valid object
102
+ - \ref SU_ERROR_NULL_POINTER_INPUT if {start,end}_path is invalid and
103
+ {start,end}_point is NULL
104
+ - \ref SU_ERROR_INVALID_ARGUMENT {start,end}_path is valid but refers to an
105
+ invalid instance path
106
+ - \ref SU_ERROR_GENERIC if {start,end}_point is NULL and {start,end}_path
107
+ doesn't have a vertex or guide point for its leaf
108
+ */
109
+ SU_RESULT SUDimensionLinearCreate(
110
+ SUDimensionLinearRef* dimension, const struct SUPoint3D* start_point,
111
+ SUInstancePathRef start_path, const struct SUPoint3D* end_point, SUInstancePathRef end_path,
112
+ double offset);
113
+
114
+ /**
115
+ @brief Releases a dimension object.
116
+ @since SketchUp 2017, API 5.0
117
+ @param[in] dimension The dimension object.
118
+ @related SUDimensionLinearRef
119
+ @return
120
+ - \ref SU_ERROR_NONE on success
121
+ - \ref SU_ERROR_INVALID_INPUT if dimension is an invalid object
122
+ - \ref SU_ERROR_NULL_POINTER_INPUT if dimension is NULL
123
+ */
124
+ SU_RESULT SUDimensionLinearRelease(SUDimensionLinearRef* dimension);
125
+
126
+ /**
127
+ @brief Retrieves the start point of a dimension object. The given instance path
128
+ object either must have been constructed using one of the
129
+ SUInstancePathCreate* functions or it will be generated on the fly if it
130
+ is invalid. It must be released using SUInstancePathRelease() when
131
+ it is no longer needed.
132
+ @since SketchUp 2017, API 5.0
133
+ @param[in] dimension The dimension object.
134
+ @param[out] point The 3d point retrieved.
135
+ @param[out] path The instance path retrieved.
136
+ @related SUDimensionLinearRef
137
+ @return
138
+ - \ref SU_ERROR_NONE on success
139
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
140
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if point or path are NULL
141
+ */
142
+ SU_RESULT SUDimensionLinearGetStartPoint(
143
+ SUDimensionLinearRef dimension, struct SUPoint3D* point, SUInstancePathRef* path);
144
+
145
+ /**
146
+ @brief Sets the start connection point of a dimension object. A dimension's
147
+ connection point can be set in a few different ways. In the simplest
148
+ form a connection point can be set to an arbitrary point in space by
149
+ providing a non-null \ref SUPoint3D and an invalid
150
+ \ref SUInstancePathRef. The more complex forms connect the point to a
151
+ position on an entity in the model by providing a valid \ref
152
+ SUInstancePathRef which refers to an existing model entity. In the more
153
+ complex forms the the input SUPoint3D must be non-null for all
154
+ connectable entity types except for vertices and guide points, in which
155
+ case the \ref SUPoint3D argument may be null as it will be ignored. It
156
+ should be noted that when changing a dimension's connection point the
157
+ other point may need to be adjusted as well. Users may want to verify
158
+ the other connection point after setting this one.
159
+ @since SketchUp 2017, API 5.0
160
+
161
+ @code{.c}
162
+ // Simple Example: Connect to an arbitrary position in space
163
+ SUPoint3D point{ xposition, yposition, zposition};
164
+ SUDimensionLinearSetStartPoint(dimension, &point, SU_INVALID);
165
+ @endcode
166
+
167
+ @code{.c}
168
+ // Vertex Example: Connect to vertex entity
169
+ SUInstancePathRef path = SU_INVALID;
170
+ SUInstancePathCreate(&path);
171
+ SUInstancePathSetLeaf(path, SUVertexToEntity(vertex));
172
+ SUDimensionLinearSetStartPoint(dimension, NULL, path);
173
+ @endcode
174
+
175
+ @code{.c}
176
+ // Edge Example: Connect to nearest point on an instance of an edge entity
177
+ SUPoint3D point{ xposition, yposition, zposition};
178
+ SUInstancePathRef path = SU_INVALID;
179
+ SUInstancePathCreate(&path);
180
+ SUInstancePathPushInstance(path, instance);
181
+ SUInstancePathSetLeaf(path, SUEdgeToEntity(edge));
182
+ SUDimensionLinearSetStartPoint(dimension, &point, path);
183
+ @endcode
184
+
185
+ @param[in] dimension The dimension object.
186
+ @param[in] point The 3d point to be set.
187
+ @param[in] path The instance path to be set.
188
+ @related SUDimensionLinearRef
189
+ @return
190
+ - \ref SU_ERROR_NONE on success
191
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
192
+ - \ref SU_ERROR_NULL_POINTER_INPUT if path is invalid and point is NULL
193
+ - \ref SU_ERROR_INVALID_ARGUMENT path is valid but refers to an invalid
194
+ instance path
195
+ - \ref SU_ERROR_GENERIC if point is NULL and path doesn't have a vertex or
196
+ guide point for its leaf
197
+ */
198
+ SU_RESULT SUDimensionLinearSetStartPoint(
199
+ SUDimensionLinearRef dimension, const struct SUPoint3D* point, SUInstancePathRef path);
200
+
201
+ /**
202
+ @brief Retrieves the end point of a dimension object. The given instance path
203
+ object either must have been constructed using one of the
204
+ SUInstancePathCreate* functions or it will be generated on the fly if it
205
+ is invalid. It must be released using SUInstancePathRelease() when
206
+ it is no longer needed.
207
+ @since SketchUp 2017, API 5.0
208
+ @param[in] dimension The dimension object.
209
+ @param[out] point The 3d point retrieved.
210
+ @param[out] path The instance path retrieved.
211
+ @related SUDimensionLinearRef
212
+ @return
213
+ - \ref SU_ERROR_NONE on success
214
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
215
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if point or path are NULL
216
+ */
217
+ SU_RESULT SUDimensionLinearGetEndPoint(
218
+ SUDimensionLinearRef dimension, struct SUPoint3D* point, SUInstancePathRef* path);
219
+
220
+ /**
221
+ @brief Sets the end connection point of a dimension object. Refer to the
222
+ documentation for \ref SUDimensionLinearSetStartPoint() for a detailed
223
+ description on supported ways of setting a dimension's connection point.
224
+ @since SketchUp 2017, API 5.0
225
+ @param[in] dimension The dimension object.
226
+ @param[in] point The 3d point to be set.
227
+ @param[in] path The instance path to be set.
228
+ @related SUDimensionLinearRef
229
+ @return
230
+ - \ref SU_ERROR_NONE on success
231
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
232
+ - \ref SU_ERROR_NULL_POINTER_INPUT if path is invalid and point is NULL
233
+ - \ref SU_ERROR_INVALID_ARGUMENT path is valid but refers to an invalid
234
+ instance path
235
+ - \ref SU_ERROR_GENERIC if point is NULL and path doesn't have a vertex or
236
+ guide point for its leaf
237
+ */
238
+ SU_RESULT SUDimensionLinearSetEndPoint(
239
+ SUDimensionLinearRef dimension, const struct SUPoint3D* point, SUInstancePathRef path);
240
+
241
+ /**
242
+ @brief Retrieves the x-axis of a dimension object. The x-axis is the axis along
243
+ the length of the dimension.
244
+ @since SketchUp 2017, API 5.0
245
+ @param[in] dimension The dimension object.
246
+ @param[out] axis The 3d vector retrieved.
247
+ @related SUDimensionLinearRef
248
+ @return
249
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
250
+ - \ref SU_ERROR_NULL_POINTER_INPUT if path is invalid and point is NULL
251
+ - \ref SU_ERROR_INVALID_INPUT if point is not NULL and path refers to an
252
+ invalid instance path
253
+ - \ref SU_ERROR_GENERIC if point is NULL and path doesn't have a vertex or
254
+ guide point for its leaf
255
+ */
256
+ SU_RESULT SUDimensionLinearGetXAxis(SUDimensionLinearRef dimension, struct SUVector3D* axis);
257
+
258
+ /**
259
+ @brief Sets the x-axis of a dimension object.
260
+ @since SketchUp 2017, API 5.0
261
+ @param[in] dimension The dimension object.
262
+ @param[in] axis The 3d vector to be set.
263
+ @related SUDimensionLinearRef
264
+ @return
265
+ - \ref SU_ERROR_NONE on success
266
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
267
+ - \ref SU_ERROR_NULL_POINTER_INPUT if axis is NULL
268
+ */
269
+ SU_RESULT SUDimensionLinearSetXAxis(SUDimensionLinearRef dimension, const struct SUVector3D* axis);
270
+
271
+ /**
272
+ @brief Retrieves the normal vector of a dimension object. The normal vector is
273
+ a unit vector pointing out of the plane of the linear dimension. A
274
+ linear dimension's plane is the plane defined by the x-axis and the
275
+ leader lines' direction vector.
276
+ @since SketchUp 2017, API 5.0
277
+ @param[in] dimension The dimension object.
278
+ @param[out] normal The 3d vector retrieved.
279
+ @related SUDimensionLinearRef
280
+ @return
281
+ - \ref SU_ERROR_NONE on success
282
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
283
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if normal is NULL
284
+ */
285
+ SU_RESULT SUDimensionLinearGetNormal(SUDimensionLinearRef dimension, struct SUVector3D* normal);
286
+
287
+ /**
288
+ @brief Sets the normal vector of a dimension object.
289
+ @since SketchUp 2017, API 5.0
290
+ @param[in] dimension The dimension object.
291
+ @param[in] normal The 3d vector to be set.
292
+ @related SUDimensionLinearRef
293
+ @return
294
+ - \ref SU_ERROR_NONE on success
295
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
296
+ - \ref SU_ERROR_NULL_POINTER_INPUT if normal is NULL
297
+ */
298
+ SU_RESULT SUDimensionLinearSetNormal(
299
+ SUDimensionLinearRef dimension, const struct SUVector3D* normal);
300
+
301
+ /**
302
+ @brief Retrieves the position of a dimension object. The position is a 2D point
303
+ in the dimension's plane indicating where the dimension text is located.
304
+ @since SketchUp 2017, API 5.0
305
+ @param[in] dimension The dimension object.
306
+ @param[out] position The position retrieved.
307
+ @related SUDimensionLinearRef
308
+ @return
309
+ - \ref SU_ERROR_NONE on success
310
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
311
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if position is NULL
312
+ */
313
+ SU_RESULT SUDimensionLinearGetPosition(SUDimensionLinearRef dimension, struct SUPoint2D* position);
314
+
315
+ /**
316
+ @brief Sets the position of a dimension object.
317
+ @since SketchUp 2017, API 5.0
318
+ @param[in] dimension The dimension object.
319
+ @param[in] position The position to be set.
320
+ @related SUDimensionLinearRef
321
+ @return
322
+ - \ref SU_ERROR_NONE on success
323
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
324
+ - \ref SU_ERROR_NULL_POINTER_INPUT if position is NULL
325
+ */
326
+ SU_RESULT SUDimensionLinearSetPosition(
327
+ SUDimensionLinearRef dimension, const struct SUPoint2D* position);
328
+
329
+ /**
330
+ @brief Retrieves an enum value indicating the dimension's vertical alignment
331
+ type.
332
+ @since SketchUp 2017, API 5.0
333
+ @param[in] dimension The dimension object.
334
+ @param[out] alignment The dimension alignment enum value retrieved.
335
+ @related SUDimensionLinearRef
336
+ @return
337
+ - \ref SU_ERROR_NONE on success
338
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
339
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if alignment is NULL
340
+ */
341
+ SU_RESULT SUDimensionLinearGetVerticalAlignment(
342
+ SUDimensionLinearRef dimension, enum SUVerticalTextPositionType* alignment);
343
+
344
+ /**
345
+ @brief Sets the dimension's vertical alignment type.
346
+ @since SketchUp 2017, API 5.0
347
+ @param[in] dimension The dimension object.
348
+ @param[in] alignment The dimension alignment type to be set.
349
+ @related SUDimensionLinearRef
350
+ @return
351
+ - \ref SU_ERROR_NONE on success
352
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
353
+ */
354
+ SU_RESULT SUDimensionLinearSetVerticalAlignment(
355
+ SUDimensionLinearRef dimension, enum SUVerticalTextPositionType alignment);
356
+
357
+ /**
358
+ @brief Retrieves an enum value indicating the dimension's horizontal alignment
359
+ type.
360
+ @since SketchUp 2017, API 5.0
361
+ @param[in] dimension The dimension object.
362
+ @param[out] alignment The dimension alignment enum value retrieved.
363
+ @related SUDimensionLinearRef
364
+ @return
365
+ - \ref SU_ERROR_NONE on success
366
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
367
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if alignment is NULL
368
+ */
369
+ SU_RESULT SUDimensionLinearGetHorizontalAlignment(
370
+ SUDimensionLinearRef dimension, enum SUHorizontalTextPositionType* alignment);
371
+
372
+ /**
373
+ @brief Sets the dimension's horizontal alignment type.
374
+ @since SketchUp 2017, API 5.0
375
+ @param[in] dimension The dimension object.
376
+ @param[in] alignment The dimension alignment type to be set.
377
+ @related SUDimensionLinearRef
378
+ @return
379
+ - \ref SU_ERROR_NONE on success
380
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
381
+ */
382
+ SU_RESULT SUDimensionLinearSetHorizontalAlignment(
383
+ SUDimensionLinearRef dimension, enum SUHorizontalTextPositionType alignment);
384
+
385
+ /**
386
+ @brief Retrieves an enum value indicating the linear dimension's alignment
387
+ type.
388
+ @since SketchUp 2019, API 7.0
389
+ @param[in] dimension The dimension object.
390
+ @param[out] alignment The dimension alignment enum value retrieved.
391
+ @related SUDimensionLinearRef
392
+ @return
393
+ - \ref SU_ERROR_NONE on success
394
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
395
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if alignment is NULL
396
+ */
397
+ SU_RESULT SUDimensionLinearGetAlignment(
398
+ SUDimensionLinearRef dimension, enum SUDimensionLinearAlignmentType* alignment);
399
+
400
+ /**
401
+ @brief Retrieves the position of the text location attachment point of the
402
+ dimension text. Note that depending on the TextPosition enumerator, this
403
+ can be the center or side of a text element.
404
+ @since SketchUp 2019, API 7.0
405
+ @param[in] dimension The dimension object.
406
+ @param[out] position The position of the text element.
407
+ @related SUDimensionLinearRef
408
+ @return
409
+ - \ref SU_ERROR_NONE on success
410
+ - \ref SU_ERROR_OUT_OF_RANGE if the dimension text relation is invalid
411
+ - \ref SU_ERROR_INVALID_INPUT if dimension is not a valid object
412
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if position is NULL
413
+ */
414
+ SU_RESULT SUDimensionLinearGetTextPosition(
415
+ SUDimensionLinearRef dimension, struct SUPoint3D* position);
416
+
417
+ #ifdef __cplusplus
418
+ } // extern "C"
419
+ #endif
420
+
421
+ #endif // SKETCHUP_MODEL_DIMENSION_LINEAR_H_