scriptup 2026.0.1 → 2026.0.2

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 (501) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +43 -24
  3. data/ext/arc_curve.c +50 -0
  4. data/ext/attribute_dictionaries.c +49 -32
  5. data/ext/attribute_dictionary.c +54 -127
  6. data/ext/axes.c +79 -0
  7. data/ext/behavior.c +100 -9
  8. data/ext/bounding_box.c +195 -0
  9. data/ext/camera.c +178 -0
  10. data/ext/classifications.c +85 -0
  11. data/ext/color.c +91 -163
  12. data/ext/component_definition.c +78 -162
  13. data/ext/component_instance.c +88 -9
  14. data/ext/construction.c +59 -0
  15. data/ext/curve.c +87 -0
  16. data/ext/definition_list.c +89 -109
  17. data/ext/depend +1 -0
  18. data/ext/drawing_element.c +96 -117
  19. data/ext/edge.c +147 -0
  20. data/ext/edge_use.c +37 -0
  21. data/ext/entities.c +573 -16
  22. data/ext/entities_builder.c +145 -0
  23. data/ext/entity.c +175 -215
  24. data/ext/environments.c +149 -0
  25. data/ext/extconf.rb +54 -10
  26. data/ext/face.c +331 -0
  27. data/ext/geom.c +172 -0
  28. data/ext/group.c +86 -0
  29. data/ext/helpers.c +244 -0
  30. data/ext/image.c +182 -0
  31. data/ext/image_rep.c +158 -0
  32. data/ext/instance_path.c +185 -0
  33. data/ext/lat_long.c +88 -0
  34. data/ext/layer.c +98 -0
  35. data/ext/layer_folder.c +99 -0
  36. data/ext/layers.c +122 -0
  37. data/ext/length.c +253 -0
  38. data/ext/line_styles.c +60 -0
  39. data/ext/loop.c +24 -0
  40. data/ext/material.c +144 -197
  41. data/ext/materials.c +49 -60
  42. data/ext/model.c +232 -26
  43. data/ext/options_store.c +188 -0
  44. data/ext/page.c +168 -0
  45. data/ext/pages.c +135 -0
  46. data/ext/point2d.c +195 -0
  47. data/ext/point3d.c +340 -0
  48. data/ext/polygon_mesh.c +253 -0
  49. data/ext/scriptup.h +279 -0
  50. data/ext/section_plane.c +44 -0
  51. data/ext/sketchup.c +102 -76
  52. data/ext/styles.c +91 -0
  53. data/ext/text.c +135 -0
  54. data/ext/texture.c +74 -83
  55. data/ext/texture_writer.c +104 -0
  56. data/ext/transformation.c +309 -0
  57. data/ext/transformation2d.c +190 -0
  58. data/ext/uv_helper.c +41 -0
  59. data/ext/vector2d.c +238 -0
  60. data/ext/vector3d.c +294 -0
  61. data/ext/vertex.c +67 -0
  62. data/lib/sketchup.rb +2 -2
  63. data/sig/_top_level.rbs +188 -0
  64. data/sig/array.rbs +52 -0
  65. data/sig/geom/bounding_box.rbs +28 -0
  66. data/sig/geom/bounds2d.rbs +20 -0
  67. data/sig/geom/lat_long.rbs +13 -0
  68. data/sig/geom/oriented_bounds2d.rbs +10 -0
  69. data/sig/geom/point2d.rbs +32 -0
  70. data/sig/geom/point3d.rbs +46 -0
  71. data/sig/geom/polygon_mesh.rbs +35 -0
  72. data/sig/geom/transformation.rbs +44 -0
  73. data/sig/geom/transformation2d.rbs +26 -0
  74. data/sig/geom/utm.rbs +14 -0
  75. data/sig/geom/vector2d.rbs +40 -0
  76. data/sig/geom/vector3d.rbs +49 -0
  77. data/sig/geom.rbs +25 -0
  78. data/sig/language_handler.rbs +8 -0
  79. data/sig/layout/angular_dimension.rbs +32 -0
  80. data/sig/layout/auto_text_definition.rbs +73 -0
  81. data/sig/layout/auto_text_definitions.rbs +15 -0
  82. data/sig/layout/connection_point.rbs +6 -0
  83. data/sig/layout/dictionary.rbs +18 -0
  84. data/sig/layout/document.rbs +61 -0
  85. data/sig/layout/ellipse.rbs +5 -0
  86. data/sig/layout/entities.rbs +10 -0
  87. data/sig/layout/entity.rbs +28 -0
  88. data/sig/layout/formatted_text.rbs +30 -0
  89. data/sig/layout/grid.rbs +24 -0
  90. data/sig/layout/group.rbs +17 -0
  91. data/sig/layout/image.rbs +7 -0
  92. data/sig/layout/label.rbs +31 -0
  93. data/sig/layout/layer.rbs +21 -0
  94. data/sig/layout/layer_instance.rbs +9 -0
  95. data/sig/layout/layers.rbs +18 -0
  96. data/sig/layout/linear_dimension.rbs +39 -0
  97. data/sig/layout/locked_entity_error.rbs +4 -0
  98. data/sig/layout/locked_layer_error.rbs +4 -0
  99. data/sig/layout/page.rbs +20 -0
  100. data/sig/layout/page_info.rbs +37 -0
  101. data/sig/layout/pages.rbs +17 -0
  102. data/sig/layout/path.rbs +34 -0
  103. data/sig/layout/rectangle.rbs +15 -0
  104. data/sig/layout/reference_entity.rbs +7 -0
  105. data/sig/layout/sketch_up_model.rbs +54 -0
  106. data/sig/layout/style.rbs +150 -0
  107. data/sig/layout/table.rbs +17 -0
  108. data/sig/layout/table_cell.rbs +13 -0
  109. data/sig/layout/table_column.rbs +10 -0
  110. data/sig/layout/table_row.rbs +10 -0
  111. data/sig/layout.rbs +4 -0
  112. data/sig/length.rbs +37 -0
  113. data/sig/numeric.rbs +23 -0
  114. data/sig/sketchup/animation.rbs +8 -0
  115. data/sig/sketchup/app_observer.rbs +11 -0
  116. data/sig/sketchup/arc_curve.rbs +14 -0
  117. data/sig/sketchup/attribute_dictionaries.rbs +11 -0
  118. data/sig/sketchup/attribute_dictionary.rbs +18 -0
  119. data/sig/sketchup/axes.rbs +13 -0
  120. data/sig/sketchup/behavior.rbs +19 -0
  121. data/sig/sketchup/camera.rbs +33 -0
  122. data/sig/sketchup/classification_schema.rbs +8 -0
  123. data/sig/sketchup/classifications.rbs +12 -0
  124. data/sig/sketchup/color.rbs +22 -0
  125. data/sig/sketchup/component_definition.rbs +43 -0
  126. data/sig/sketchup/component_instance.rbs +32 -0
  127. data/sig/sketchup/console.rbs +8 -0
  128. data/sig/sketchup/construction_line.rbs +17 -0
  129. data/sig/sketchup/construction_point.rbs +5 -0
  130. data/sig/sketchup/curve.rbs +13 -0
  131. data/sig/sketchup/definition_list.rbs +26 -0
  132. data/sig/sketchup/definition_observer.rbs +6 -0
  133. data/sig/sketchup/definitions_observer.rbs +8 -0
  134. data/sig/sketchup/dimension.rbs +18 -0
  135. data/sig/sketchup/dimension_linear.rbs +24 -0
  136. data/sig/sketchup/dimension_observer.rbs +5 -0
  137. data/sig/sketchup/dimension_radial.rbs +9 -0
  138. data/sig/sketchup/drawingelement.rbs +18 -0
  139. data/sig/sketchup/edge.rbs +24 -0
  140. data/sig/sketchup/edge_use.rbs +13 -0
  141. data/sig/sketchup/entities.rbs +61 -0
  142. data/sig/sketchup/entities_builder.rbs +15 -0
  143. data/sig/sketchup/entities_observer.rbs +9 -0
  144. data/sig/sketchup/entity.rbs +21 -0
  145. data/sig/sketchup/entity_observer.rbs +6 -0
  146. data/sig/sketchup/environment.rbs +25 -0
  147. data/sig/sketchup/environments.rbs +18 -0
  148. data/sig/sketchup/environments_observer.rbs +8 -0
  149. data/sig/sketchup/extensions_manager.rbs +11 -0
  150. data/sig/sketchup/face.rbs +44 -0
  151. data/sig/sketchup/frame_change_observer.rbs +5 -0
  152. data/sig/sketchup/group.rbs +38 -0
  153. data/sig/sketchup/http/request.rbs +17 -0
  154. data/sig/sketchup/http/response.rbs +7 -0
  155. data/sig/sketchup/http.rbs +27 -0
  156. data/sig/sketchup/image.rbs +23 -0
  157. data/sig/sketchup/image_rep.rbs +17 -0
  158. data/sig/sketchup/importer.rbs +14 -0
  159. data/sig/sketchup/input_point.rbs +25 -0
  160. data/sig/sketchup/instance_observer.rbs +6 -0
  161. data/sig/sketchup/instance_path.rbs +20 -0
  162. data/sig/sketchup/layer.rbs +20 -0
  163. data/sig/sketchup/layer_folder.rbs +26 -0
  164. data/sig/sketchup/layers.rbs +30 -0
  165. data/sig/sketchup/layers_observer.rbs +13 -0
  166. data/sig/sketchup/licensing/extension_license.rbs +8 -0
  167. data/sig/sketchup/licensing.rbs +15 -0
  168. data/sig/sketchup/line_style.rbs +5 -0
  169. data/sig/sketchup/line_styles.rbs +13 -0
  170. data/sig/sketchup/load_handler.rbs +8 -0
  171. data/sig/sketchup/loop.rbs +10 -0
  172. data/sig/sketchup/material.rbs +74 -0
  173. data/sig/sketchup/materials.rbs +22 -0
  174. data/sig/sketchup/materials_observer.rbs +10 -0
  175. data/sig/sketchup/menu.rbs +9 -0
  176. data/sig/sketchup/model.rbs +105 -0
  177. data/sig/sketchup/model_observer.rbs +23 -0
  178. data/sig/sketchup/options_manager.rbs +12 -0
  179. data/sig/sketchup/options_provider.rbs +23 -0
  180. data/sig/sketchup/options_provider_observer.rbs +5 -0
  181. data/sig/sketchup/overlay.rbs +21 -0
  182. data/sig/sketchup/overlays_manager.rbs +10 -0
  183. data/sig/sketchup/page.rbs +55 -0
  184. data/sig/sketchup/pages.rbs +25 -0
  185. data/sig/sketchup/pages_observer.rbs +7 -0
  186. data/sig/sketchup/pick_helper.rbs +28 -0
  187. data/sig/sketchup/regional_settings.rbs +7 -0
  188. data/sig/sketchup/rendering_options.rbs +89 -0
  189. data/sig/sketchup/rendering_options_observer.rbs +5 -0
  190. data/sig/sketchup/section_plane.rbs +12 -0
  191. data/sig/sketchup/selection.rbs +31 -0
  192. data/sig/sketchup/selection_observer.rbs +8 -0
  193. data/sig/sketchup/set.rbs +15 -0
  194. data/sig/sketchup/shadow_info.rbs +18 -0
  195. data/sig/sketchup/shadow_info_observer.rbs +5 -0
  196. data/sig/sketchup/skp.rbs +5 -0
  197. data/sig/sketchup/snap.rbs +10 -0
  198. data/sig/sketchup/style.rbs +9 -0
  199. data/sig/sketchup/styles.rbs +21 -0
  200. data/sig/sketchup/text.rbs +22 -0
  201. data/sig/sketchup/texture.rbs +14 -0
  202. data/sig/sketchup/texture_writer.rbs +14 -0
  203. data/sig/sketchup/tool.rbs +45 -0
  204. data/sig/sketchup/tools.rbs +14 -0
  205. data/sig/sketchup/tools_observer.rbs +6 -0
  206. data/sig/sketchup/uv_helper.rbs +6 -0
  207. data/sig/sketchup/vertex.rbs +11 -0
  208. data/sig/sketchup/view.rbs +87 -0
  209. data/sig/sketchup/view_observer.rbs +6 -0
  210. data/sig/sketchup.rbs +137 -0
  211. data/sig/sketchup_extension.rbs +23 -0
  212. data/sig/string.rbs +5 -0
  213. data/sig/ui/command.rbs +20 -0
  214. data/sig/ui/html_dialog.rbs +29 -0
  215. data/sig/ui/notification.rbs +16 -0
  216. data/sig/ui/toolbar.rbs +18 -0
  217. data/sig/ui/web_dialog.rbs +38 -0
  218. data/sig/ui.rbs +66 -0
  219. metadata +204 -287
  220. data/ext/attribute_dictionaries.h +0 -8
  221. data/ext/attribute_dictionary.h +0 -8
  222. data/ext/behavior.h +0 -8
  223. data/ext/color.h +0 -8
  224. data/ext/component_definition.h +0 -8
  225. data/ext/component_instance.h +0 -8
  226. data/ext/definition_list.h +0 -8
  227. data/ext/drawing_element.h +0 -8
  228. data/ext/entities.h +0 -8
  229. data/ext/entity.h +0 -8
  230. data/ext/material.h +0 -8
  231. data/ext/materials.h +0 -8
  232. data/ext/model.h +0 -8
  233. data/ext/not_implemented.c +0 -88
  234. data/ext/not_implemented.h +0 -20
  235. data/ext/sketchup.h +0 -9
  236. data/ext/texture.h +0 -8
  237. data/ext/typed_value.c +0 -84
  238. data/ext/typed_value.h +0 -11
  239. data/ext/utils.h +0 -111
  240. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Frameworks/libCommonGeometry.dylib +0 -0
  241. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Frameworks/libCommonGeoutils.dylib +0 -0
  242. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Frameworks/libCommonImage.dylib +0 -4
  243. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Frameworks/libCommonPreferences.dylib +0 -0
  244. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Frameworks/libCommonUnits.dylib +0 -0
  245. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Frameworks/libCommonUtils.dylib +0 -0
  246. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Frameworks/libCommonZip.dylib +0 -0
  247. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/application.h +0 -36
  248. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/model.h +0 -59
  249. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/overlay.h +0 -262
  250. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/ruby_api.h +0 -118
  251. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/color.h +0 -107
  252. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/common.h +0 -178
  253. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/defs.h +0 -19
  254. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/extension_license.h +0 -70
  255. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/bounding_box.h +0 -34
  256. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/plane3d.h +0 -153
  257. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point2d.h +0 -96
  258. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point3d.h +0 -98
  259. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/ray3d.h +0 -64
  260. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/transformation.h +0 -321
  261. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/transformation2d.h +0 -163
  262. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector2d.h +0 -235
  263. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector3d.h +0 -285
  264. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry.h +0 -154
  265. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/modelexporterplugin.h +0 -165
  266. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/modelimporterplugin.h +0 -187
  267. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/pluginprogresscallback.h +0 -84
  268. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/initialize.h +0 -43
  269. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/length_formatter.h +0 -424
  270. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/arccurve.h +0 -244
  271. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/arrow_type.h +0 -17
  272. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/attribute_dictionary.h +0 -161
  273. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/axes.h +0 -242
  274. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/camera.h +0 -398
  275. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classification_attribute.h +0 -89
  276. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classification_info.h +0 -125
  277. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classifications.h +0 -86
  278. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_definition.h +0 -629
  279. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_definition_snap_to_behavior_private.h +0 -46
  280. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_instance.h +0 -344
  281. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/curve.h +0 -143
  282. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/defs.h +0 -147
  283. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension.h +0 -224
  284. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_linear.h +0 -421
  285. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_radial.h +0 -194
  286. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_style.h +0 -253
  287. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/drawing_element.h +0 -198
  288. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dynamic_component_attribute.h +0 -92
  289. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dynamic_component_info.h +0 -70
  290. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/edge.h +0 -271
  291. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/edge_use.h +0 -214
  292. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entities.h +0 -879
  293. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity.h +0 -189
  294. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity_list.h +0 -80
  295. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity_list_iterator.h +0 -90
  296. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/environment.h +0 -382
  297. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/environments.h +0 -133
  298. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/face.h +0 -702
  299. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/font.h +0 -138
  300. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/geometry.h +0 -20
  301. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/geometry_input.h +0 -695
  302. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/group.h +0 -245
  303. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/guide_line.h +0 -155
  304. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/guide_point.h +0 -153
  305. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/image.h +0 -289
  306. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/image_rep.h +0 -275
  307. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/instancepath.h +0 -266
  308. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/layer.h +0 -265
  309. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/layer_folder.h +0 -301
  310. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/line_style.h +0 -211
  311. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/line_styles.h +0 -81
  312. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/location.h +0 -65
  313. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/loop.h +0 -182
  314. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/material.h +0 -797
  315. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/mesh_helper.h +0 -187
  316. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model.h +0 -1826
  317. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model_entity_type_private.h +0 -44
  318. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model_version.h +0 -49
  319. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/opening.h +0 -72
  320. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/options_manager.h +0 -79
  321. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/options_provider.h +0 -166
  322. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/polyline3d.h +0 -140
  323. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/rendering_options.h +0 -180
  324. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/scene.h +0 -1016
  325. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/schema.h +0 -56
  326. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/schema_type.h +0 -26
  327. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/section_plane.h +0 -212
  328. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/selection.h +0 -156
  329. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/shadow_info.h +0 -147
  330. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/skp.h +0 -45
  331. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/snap.h +0 -183
  332. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/space.h +0 -26
  333. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/style.h +0 -303
  334. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/styles.h +0 -192
  335. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/text.h +0 -392
  336. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/texture.h +0 -380
  337. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/texture_writer.h +0 -280
  338. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/typed_value.h +0 -390
  339. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/uv_helper.h +0 -79
  340. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/vertex.h +0 -154
  341. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/sketchup.h +0 -125
  342. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/sketchup_info.h +0 -65
  343. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/slapi.h +0 -16
  344. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/transformation.h +0 -16
  345. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/unicodestring.h +0 -239
  346. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/utils/math_helpers.h +0 -124
  347. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Resources/Info.plist +0 -50
  348. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/SketchUpAPI +0 -0
  349. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/_CodeSignature/CodeResources +0 -891
  350. data/sketchup-sdk-win/binaries/layout/x64/LayOutAPI.dll +0 -0
  351. data/sketchup-sdk-win/binaries/layout/x64/LayOutAPI.lib +0 -0
  352. data/sketchup-sdk-win/binaries/layout/x64/LayOutControllers.dll +0 -0
  353. data/sketchup-sdk-win/binaries/layout/x64/LayOutModel.dll +0 -0
  354. data/sketchup-sdk-win/binaries/layout/x64/LayOutRTF.dll +0 -0
  355. data/sketchup-sdk-win/binaries/layout/x64/LayOutUtils.dll +0 -0
  356. data/sketchup-sdk-win/binaries/layout/x64/LayOutView.dll +0 -4
  357. data/sketchup-sdk-win/binaries/layout/x64/SketchUpCommonPreferences.dll +0 -0
  358. data/sketchup-sdk-win/binaries/layout/x64/SketchUpViewerAPI.dll +0 -0
  359. data/sketchup-sdk-win/binaries/layout/x64/SketchUpViewerAPI.lib +0 -0
  360. data/sketchup-sdk-win/binaries/layout/x64/pdflib.dll +0 -0
  361. data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpAPI.dll +0 -0
  362. data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpAPI.lib +0 -0
  363. data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpCommonPreferences.dll +0 -0
  364. data/sketchup-sdk-win/binaries/sketchup/x64/sketchup.lib +0 -0
  365. data/sketchup-sdk-win/headers/LayOutAPI/application/application.h +0 -117
  366. data/sketchup-sdk-win/headers/LayOutAPI/common.h +0 -22
  367. data/sketchup-sdk-win/headers/LayOutAPI/geometry/geometry.h +0 -78
  368. data/sketchup-sdk-win/headers/LayOutAPI/initialize.h +0 -36
  369. data/sketchup-sdk-win/headers/LayOutAPI/layout.h +0 -49
  370. data/sketchup-sdk-win/headers/LayOutAPI/model/angulardimension.h +0 -468
  371. data/sketchup-sdk-win/headers/LayOutAPI/model/autotextdefinition.h +0 -569
  372. data/sketchup-sdk-win/headers/LayOutAPI/model/autotextdefinitionlist.h +0 -79
  373. data/sketchup-sdk-win/headers/LayOutAPI/model/connectionpoint.h +0 -107
  374. data/sketchup-sdk-win/headers/LayOutAPI/model/defs.h +0 -42
  375. data/sketchup-sdk-win/headers/LayOutAPI/model/dictionary.h +0 -120
  376. data/sketchup-sdk-win/headers/LayOutAPI/model/document.h +0 -937
  377. data/sketchup-sdk-win/headers/LayOutAPI/model/documentexportoptions.h +0 -78
  378. data/sketchup-sdk-win/headers/LayOutAPI/model/ellipse.h +0 -78
  379. data/sketchup-sdk-win/headers/LayOutAPI/model/entity.h +0 -402
  380. data/sketchup-sdk-win/headers/LayOutAPI/model/entityiterator.h +0 -49
  381. data/sketchup-sdk-win/headers/LayOutAPI/model/entitylist.h +0 -114
  382. data/sketchup-sdk-win/headers/LayOutAPI/model/formattedtext.h +0 -397
  383. data/sketchup-sdk-win/headers/LayOutAPI/model/grid.h +0 -251
  384. data/sketchup-sdk-win/headers/LayOutAPI/model/group.h +0 -244
  385. data/sketchup-sdk-win/headers/LayOutAPI/model/image.h +0 -146
  386. data/sketchup-sdk-win/headers/LayOutAPI/model/imagerep.h +0 -109
  387. data/sketchup-sdk-win/headers/LayOutAPI/model/label.h +0 -332
  388. data/sketchup-sdk-win/headers/LayOutAPI/model/layer.h +0 -207
  389. data/sketchup-sdk-win/headers/LayOutAPI/model/layerinstance.h +0 -117
  390. data/sketchup-sdk-win/headers/LayOutAPI/model/layerlist.h +0 -69
  391. data/sketchup-sdk-win/headers/LayOutAPI/model/lineardimension.h +0 -508
  392. data/sketchup-sdk-win/headers/LayOutAPI/model/page.h +0 -331
  393. data/sketchup-sdk-win/headers/LayOutAPI/model/pageinfo.h +0 -372
  394. data/sketchup-sdk-win/headers/LayOutAPI/model/pagelist.h +0 -81
  395. data/sketchup-sdk-win/headers/LayOutAPI/model/path.h +0 -464
  396. data/sketchup-sdk-win/headers/LayOutAPI/model/rectangle.h +0 -240
  397. data/sketchup-sdk-win/headers/LayOutAPI/model/referenceentity.h +0 -120
  398. data/sketchup-sdk-win/headers/LayOutAPI/model/sketchupmodel.h +0 -681
  399. data/sketchup-sdk-win/headers/LayOutAPI/model/style.h +0 -1116
  400. data/sketchup-sdk-win/headers/LayOutAPI/model/table.h +0 -472
  401. data/sketchup-sdk-win/headers/LayOutAPI/model/typed_value.h +0 -180
  402. data/sketchup-sdk-win/headers/SketchUpAPI/application/application.h +0 -36
  403. data/sketchup-sdk-win/headers/SketchUpAPI/application/model.h +0 -59
  404. data/sketchup-sdk-win/headers/SketchUpAPI/application/overlay.h +0 -262
  405. data/sketchup-sdk-win/headers/SketchUpAPI/application/ruby_api.h +0 -118
  406. data/sketchup-sdk-win/headers/SketchUpAPI/color.h +0 -107
  407. data/sketchup-sdk-win/headers/SketchUpAPI/common.h +0 -178
  408. data/sketchup-sdk-win/headers/SketchUpAPI/defs.h +0 -19
  409. data/sketchup-sdk-win/headers/SketchUpAPI/extension_license.h +0 -70
  410. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/bounding_box.h +0 -34
  411. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/plane3d.h +0 -153
  412. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point2d.h +0 -96
  413. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point3d.h +0 -98
  414. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/ray3d.h +0 -64
  415. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/transformation.h +0 -321
  416. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/transformation2d.h +0 -163
  417. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector2d.h +0 -235
  418. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector3d.h +0 -285
  419. data/sketchup-sdk-win/headers/SketchUpAPI/geometry.h +0 -154
  420. data/sketchup-sdk-win/headers/SketchUpAPI/import_export/modelexporterplugin.h +0 -165
  421. data/sketchup-sdk-win/headers/SketchUpAPI/import_export/modelimporterplugin.h +0 -187
  422. data/sketchup-sdk-win/headers/SketchUpAPI/import_export/pluginprogresscallback.h +0 -84
  423. data/sketchup-sdk-win/headers/SketchUpAPI/initialize.h +0 -43
  424. data/sketchup-sdk-win/headers/SketchUpAPI/length_formatter.h +0 -424
  425. data/sketchup-sdk-win/headers/SketchUpAPI/model/arccurve.h +0 -244
  426. data/sketchup-sdk-win/headers/SketchUpAPI/model/arrow_type.h +0 -17
  427. data/sketchup-sdk-win/headers/SketchUpAPI/model/attribute_dictionary.h +0 -161
  428. data/sketchup-sdk-win/headers/SketchUpAPI/model/axes.h +0 -242
  429. data/sketchup-sdk-win/headers/SketchUpAPI/model/camera.h +0 -398
  430. data/sketchup-sdk-win/headers/SketchUpAPI/model/classification_attribute.h +0 -89
  431. data/sketchup-sdk-win/headers/SketchUpAPI/model/classification_info.h +0 -125
  432. data/sketchup-sdk-win/headers/SketchUpAPI/model/classifications.h +0 -86
  433. data/sketchup-sdk-win/headers/SketchUpAPI/model/component_definition.h +0 -629
  434. data/sketchup-sdk-win/headers/SketchUpAPI/model/component_definition_snap_to_behavior_private.h +0 -46
  435. data/sketchup-sdk-win/headers/SketchUpAPI/model/component_instance.h +0 -344
  436. data/sketchup-sdk-win/headers/SketchUpAPI/model/curve.h +0 -143
  437. data/sketchup-sdk-win/headers/SketchUpAPI/model/defs.h +0 -147
  438. data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension.h +0 -224
  439. data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_linear.h +0 -421
  440. data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_radial.h +0 -194
  441. data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_style.h +0 -253
  442. data/sketchup-sdk-win/headers/SketchUpAPI/model/drawing_element.h +0 -198
  443. data/sketchup-sdk-win/headers/SketchUpAPI/model/dynamic_component_attribute.h +0 -92
  444. data/sketchup-sdk-win/headers/SketchUpAPI/model/dynamic_component_info.h +0 -70
  445. data/sketchup-sdk-win/headers/SketchUpAPI/model/edge.h +0 -271
  446. data/sketchup-sdk-win/headers/SketchUpAPI/model/edge_use.h +0 -214
  447. data/sketchup-sdk-win/headers/SketchUpAPI/model/entities.h +0 -879
  448. data/sketchup-sdk-win/headers/SketchUpAPI/model/entity.h +0 -189
  449. data/sketchup-sdk-win/headers/SketchUpAPI/model/entity_list.h +0 -80
  450. data/sketchup-sdk-win/headers/SketchUpAPI/model/entity_list_iterator.h +0 -90
  451. data/sketchup-sdk-win/headers/SketchUpAPI/model/environment.h +0 -382
  452. data/sketchup-sdk-win/headers/SketchUpAPI/model/environments.h +0 -133
  453. data/sketchup-sdk-win/headers/SketchUpAPI/model/face.h +0 -702
  454. data/sketchup-sdk-win/headers/SketchUpAPI/model/font.h +0 -138
  455. data/sketchup-sdk-win/headers/SketchUpAPI/model/geometry.h +0 -20
  456. data/sketchup-sdk-win/headers/SketchUpAPI/model/geometry_input.h +0 -695
  457. data/sketchup-sdk-win/headers/SketchUpAPI/model/group.h +0 -245
  458. data/sketchup-sdk-win/headers/SketchUpAPI/model/guide_line.h +0 -155
  459. data/sketchup-sdk-win/headers/SketchUpAPI/model/guide_point.h +0 -153
  460. data/sketchup-sdk-win/headers/SketchUpAPI/model/image.h +0 -289
  461. data/sketchup-sdk-win/headers/SketchUpAPI/model/image_rep.h +0 -275
  462. data/sketchup-sdk-win/headers/SketchUpAPI/model/instancepath.h +0 -266
  463. data/sketchup-sdk-win/headers/SketchUpAPI/model/layer.h +0 -265
  464. data/sketchup-sdk-win/headers/SketchUpAPI/model/layer_folder.h +0 -301
  465. data/sketchup-sdk-win/headers/SketchUpAPI/model/line_style.h +0 -211
  466. data/sketchup-sdk-win/headers/SketchUpAPI/model/line_styles.h +0 -81
  467. data/sketchup-sdk-win/headers/SketchUpAPI/model/location.h +0 -65
  468. data/sketchup-sdk-win/headers/SketchUpAPI/model/loop.h +0 -182
  469. data/sketchup-sdk-win/headers/SketchUpAPI/model/material.h +0 -797
  470. data/sketchup-sdk-win/headers/SketchUpAPI/model/mesh_helper.h +0 -187
  471. data/sketchup-sdk-win/headers/SketchUpAPI/model/model.h +0 -1826
  472. data/sketchup-sdk-win/headers/SketchUpAPI/model/model_entity_type_private.h +0 -44
  473. data/sketchup-sdk-win/headers/SketchUpAPI/model/model_version.h +0 -49
  474. data/sketchup-sdk-win/headers/SketchUpAPI/model/opening.h +0 -72
  475. data/sketchup-sdk-win/headers/SketchUpAPI/model/options_manager.h +0 -79
  476. data/sketchup-sdk-win/headers/SketchUpAPI/model/options_provider.h +0 -166
  477. data/sketchup-sdk-win/headers/SketchUpAPI/model/polyline3d.h +0 -140
  478. data/sketchup-sdk-win/headers/SketchUpAPI/model/rendering_options.h +0 -180
  479. data/sketchup-sdk-win/headers/SketchUpAPI/model/scene.h +0 -1016
  480. data/sketchup-sdk-win/headers/SketchUpAPI/model/schema.h +0 -56
  481. data/sketchup-sdk-win/headers/SketchUpAPI/model/schema_type.h +0 -26
  482. data/sketchup-sdk-win/headers/SketchUpAPI/model/section_plane.h +0 -212
  483. data/sketchup-sdk-win/headers/SketchUpAPI/model/selection.h +0 -156
  484. data/sketchup-sdk-win/headers/SketchUpAPI/model/shadow_info.h +0 -147
  485. data/sketchup-sdk-win/headers/SketchUpAPI/model/skp.h +0 -45
  486. data/sketchup-sdk-win/headers/SketchUpAPI/model/snap.h +0 -183
  487. data/sketchup-sdk-win/headers/SketchUpAPI/model/space.h +0 -26
  488. data/sketchup-sdk-win/headers/SketchUpAPI/model/style.h +0 -303
  489. data/sketchup-sdk-win/headers/SketchUpAPI/model/styles.h +0 -192
  490. data/sketchup-sdk-win/headers/SketchUpAPI/model/text.h +0 -392
  491. data/sketchup-sdk-win/headers/SketchUpAPI/model/texture.h +0 -380
  492. data/sketchup-sdk-win/headers/SketchUpAPI/model/texture_writer.h +0 -280
  493. data/sketchup-sdk-win/headers/SketchUpAPI/model/typed_value.h +0 -390
  494. data/sketchup-sdk-win/headers/SketchUpAPI/model/uv_helper.h +0 -79
  495. data/sketchup-sdk-win/headers/SketchUpAPI/model/vertex.h +0 -154
  496. data/sketchup-sdk-win/headers/SketchUpAPI/sketchup.h +0 -125
  497. data/sketchup-sdk-win/headers/SketchUpAPI/sketchup_info.h +0 -65
  498. data/sketchup-sdk-win/headers/SketchUpAPI/slapi.h +0 -16
  499. data/sketchup-sdk-win/headers/SketchUpAPI/transformation.h +0 -16
  500. data/sketchup-sdk-win/headers/SketchUpAPI/unicodestring.h +0 -239
  501. data/sketchup-sdk-win/headers/SketchUpAPI/utils/math_helpers.h +0 -124
@@ -1,1826 +0,0 @@
1
- // Copyright 2013-2024 Trimble Inc Ltd. All Rights Reserved.
2
-
3
- /**
4
- * @file
5
- * @brief Interfaces for SUModelRef.
6
- */
7
- #ifndef SKETCHUP_MODEL_MODEL_H_
8
- #define SKETCHUP_MODEL_MODEL_H_
9
-
10
- #include <SketchUpAPI/common.h>
11
- #include <SketchUpAPI/unicodestring.h>
12
- #include <SketchUpAPI/model/defs.h>
13
- #include <SketchUpAPI/model/model_version.h>
14
-
15
- #pragma pack(push, 8)
16
-
17
- #if defined(__APPLE__)
18
- // This is added to remove the missing declarations warning on the mac
19
- // for an enum defined inside a structure. [SUEntityType]
20
- #pragma GCC diagnostic push
21
- #pragma GCC diagnostic ignored "-Wmissing-declarations"
22
- #endif
23
-
24
- #ifdef __cplusplus
25
- extern "C" {
26
- #endif
27
-
28
- /**
29
- @struct SUModelRef
30
- @brief A SketchUp model.
31
- */
32
-
33
- // The SUEntityType enum was originally defined incorrectly in this struct.
34
- // This is not valid C. To correct this we conditionally include it in here for
35
- // C compilers, while leaving the original definition inside the struct for C++
36
- // compilers.
37
- #ifndef __cplusplus
38
- #include <SketchUpAPI/model/model_entity_type_private.h>
39
- #endif
40
-
41
- /**
42
- @struct SUModelStatistics
43
- @brief Contains an array of entity counts that can be indexed per entity type.
44
-
45
- @note See \ref SUEntityType for examples on how it is defined depending on
46
- whether the code is compiled as C or C++. (Related to a bug in the original implementation).
47
-
48
- @see SUEntityType
49
- @see SUModelGetStatistics
50
- */
51
- struct SUModelStatistics {
52
- #ifdef __cplusplus
53
- // See the note above for why this is included here.
54
- #include <SketchUpAPI/model/model_entity_type_private.h>
55
- #endif
56
-
57
- int entity_counts[SUNumEntityTypes]; ///< Count of each entity type.
58
- };
59
-
60
- /**
61
- @enum SUModelUnits
62
- @brief Units options settings
63
- */
64
- enum SUModelUnits {
65
- SUModelUnits_Inches,
66
- SUModelUnits_Feet,
67
- SUModelUnits_Millimeters,
68
- SUModelUnits_Centimeters,
69
- SUModelUnits_Meters
70
- };
71
-
72
- /**
73
- @enum SUModelLoadStatus
74
- @brief Provides additional status information after loading a model successfully.
75
- @since SketchUp 2021, API 9.0
76
- */
77
- enum SUModelLoadStatus {
78
- SUModelLoadStatus_Success = 0, ///< Model was loaded successfully.
79
- SUModelLoadStatus_Success_MoreRecent ///< Model was loaded successfully,
80
- ///< however it was saved by a newer
81
- ///< version of SketchUp. We strongly
82
- ///< recommended that you update your SDK
83
- ///< to the latest version.
84
- };
85
-
86
- /**
87
- @brief Creates an empty model object for the purposes of writing a SketchUp
88
- document. This model object must be released with \ref SUModelRelease().
89
- @param[out] model The model object created.
90
- @related SUModelRef
91
- @return
92
- - \ref SU_ERROR_NONE on success
93
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if model is NULL
94
- - \ref SU_ERROR_OVERWRITE_VALID if model is already a valid object
95
- */
96
- SU_RESULT SUModelCreate(SUModelRef* model);
97
-
98
- /**
99
- @brief Creates a model from a SketchUp file on local disk. This model object
100
- must be released with \ref SUModelRelease().
101
- @deprecated This method will be removed in SketchUp 2022.0. It is replaced by
102
- SUModelCreateFromFileWithStatus() which can read models
103
- saved by newer versions of SketchUp.
104
- @param[out] model The model object created.
105
- @param[in] file_path The source file path of the SketchUp file. Assumed to be
106
- UTF-8 encoded.
107
- @related SUModelRef
108
- @return
109
- - \ref SU_ERROR_NONE on success
110
- - \ref SU_ERROR_NULL_POINTER_INPUT if \p file_path is NULL
111
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p model is NULL
112
- - \ref SU_ERROR_OVERWRITE_VALID if \p model is already a valid object
113
- - \ref SU_ERROR_SERIALIZATION if an error occurs during reading of the file
114
- - \ref SU_ERROR_MODEL_INVALID if the file specified by \p file_path is an
115
- invalid model. (since SketchUp 2014, API 2.0)
116
- - \ref SU_ERROR_MODEL_VERSION if the model file has a newer version
117
- than is supported by the current build of the SDK. (since SketchUp 2014, API 2.0)
118
- */
119
- SU_DEPRECATED_FUNCTION("SketchUp API 9.0")
120
- SU_RESULT SUModelCreateFromFile(SUModelRef* model, const char* file_path);
121
-
122
- /**
123
- @brief Creates a model from a SketchUp file on local disk. This model object
124
- must be released with \ref SUModelRelease().
125
- @since SketchUp 2021, API 9.0
126
-
127
- @note As of SketchUp 2021.0, SketchUp can open .skp files created with newer versions of SketchUp.
128
- However, opening newer versions with an older SDK might omit model data. Use the load
129
- \p status value to check if the file was created with a newer version of SketchUp.
130
-
131
- @warning When reading a file created with a newer version of SketchUp, you may lose data
132
- if you write over the same file.
133
-
134
- @param[out] model The model object created.
135
- @param[in] file_path The source file path of the SketchUp file. Assumed to be
136
- UTF-8 encoded.
137
- @param[out] status Returns additional information on the status of a
138
- successful operation. Valid when the return value is
139
- \ref SU_ERROR_NONE.
140
- @related SUModelRef
141
- @return
142
- - \ref SU_ERROR_NONE on success
143
- - \ref SU_ERROR_NULL_POINTER_INPUT if \p file_path is NULL
144
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p model is NULL
145
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p status is NULL
146
- - \ref SU_ERROR_OVERWRITE_VALID if \p model is already a valid object
147
- - \ref SU_ERROR_SERIALIZATION if an error occurs during reading of the file
148
- - \ref SU_ERROR_MODEL_INVALID if the file specified by \p file_path is an
149
- invalid model.
150
- - \ref SU_ERROR_MODEL_VERSION if the model file has a newer version
151
- than is supported by the current build of the SDK.
152
- */
153
- SU_RESULT SUModelCreateFromFileWithStatus(
154
- SUModelRef* model, const char* file_path, enum SUModelLoadStatus* status);
155
-
156
- /**
157
- @brief Creates a model from a SketchUp skp file buffer. This model object must
158
- be released with \ref SUModelRelease().
159
- @since SketchUp 2017 M2, API 5.2
160
- @deprecated This method will be removed in SketchUp 2022.0. It is replaced by
161
- SUModelCreateFromBufferWithStatus() which can read models saved by newer
162
- versions of SketchUp.
163
- @param[out] model The model object created.
164
- @param[in] buffer The SketchUp file buffer.
165
- @param[in] buffer_size The SketchUp file buffer size.
166
- @related SUModelRef
167
- @return
168
- - \ref SU_ERROR_NONE on success
169
- - \ref SU_ERROR_NULL_POINTER_INPUT if \p buffer is NULL
170
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p model is NULL
171
- - \ref SU_ERROR_OVERWRITE_VALID if \p model is already a valid object
172
- - \ref SU_ERROR_SERIALIZATION if an error occurs during reading of the file
173
- - \ref SU_ERROR_MODEL_INVALID if the file specified by \p buffer is an
174
- invalid model.
175
- - \ref SU_ERROR_MODEL_VERSION if the model buffer has a newer version
176
- than is supported by the current build of the SDK.
177
- */
178
- SU_DEPRECATED_FUNCTION("SketchUp API 9.0")
179
- SU_RESULT SUModelCreateFromBuffer(
180
- SUModelRef* model, const unsigned char* buffer, size_t buffer_size);
181
-
182
- /**
183
- @brief Creates a model from a SketchUp skp file buffer. This model object must
184
- be released with \ref SUModelRelease().
185
- @since SketchUp 2021, API 9.0
186
-
187
- @note As of SketchUp 2021.0, SketchUp can open .skp files created with newer versions of SketchUp.
188
- However, opening newer versions with an older SDK might omit model data. Use the load
189
- \p status value to check if the file was created with a newer version of SketchUp.
190
-
191
- @warning When reading a file created with a newer version of SketchUp, you may lose data
192
- if you write over the same file.
193
-
194
- @param[out] model The model object created.
195
- @param[in] buffer The SketchUp file buffer.
196
- @param[in] buffer_size The SketchUp file buffer size.
197
- @param[out] status Returns additional information on the status of a
198
- successful operation. Valid when the return value is
199
- \ref SU_ERROR_NONE.
200
- @related SUModelRef
201
- @return
202
- - \ref SU_ERROR_NONE on success
203
- - \ref SU_ERROR_NULL_POINTER_INPUT if \p buffer is NULL
204
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p model is NULL
205
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p status is NULL
206
- - \ref SU_ERROR_OVERWRITE_VALID if model is already a valid object
207
- - \ref SU_ERROR_SERIALIZATION if an error occurs during reading of the file
208
- - \ref SU_ERROR_MODEL_INVALID if the file specified by \p buffer is an invalid
209
- model.
210
- - \ref SU_ERROR_MODEL_VERSION if the model buffer has a newer version
211
- than is supported by the current build of the SDK.
212
- */
213
- SU_RESULT SUModelCreateFromBufferWithStatus(
214
- SUModelRef* model, const unsigned char* buffer, size_t buffer_size,
215
- enum SUModelLoadStatus* status);
216
-
217
- /**
218
- @brief Releases a model object and its associated resources. The root component
219
- of the model object and all its child objects must not be released
220
- explicitly
221
- @param[in,out] model The model object.
222
- @related SUModelRef
223
- @return
224
- - \ref SU_ERROR_NONE on success
225
- - \ref SU_ERROR_INVALID_INPUT if model is an invalid object
226
- - \ref SU_ERROR_NULL_POINTER_INPUT if model is NULL
227
- */
228
- SU_RESULT SUModelRelease(SUModelRef* model);
229
-
230
- #ifndef DOXYGEN_SHOULD_SKIP_THIS
231
- /**
232
- @brief Returns a model reference for a given internal model representation.
233
- This model object must NOT be released with \ref SUModelRelease().
234
- @param[in] data Internal model representation.
235
- @related SUModelRef
236
- @return The created model reference.
237
- */
238
- SU_EXPORT SUModelRef SUModelFromExisting(uintptr_t data);
239
- #endif // DOXYGEN_SHOULD_SKIP_THIS
240
-
241
- /**
242
- @brief Retrieves the root model entities.
243
- @param[in] model The model object.
244
- @param[out] entities The entities retrieved.
245
- @related SUModelRef
246
- @return
247
- - \ref SU_ERROR_NONE on success
248
- - \ref SU_ERROR_INVALID_INPUT if model is an invalid object
249
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if entities is NULL
250
- */
251
- SU_RESULT SUModelGetEntities(SUModelRef model, SUEntitiesRef* entities);
252
-
253
- /**
254
- @brief Retrieves the model entities of the active context
255
- (open group or component).
256
- @since SketchUp 2020.2, API 8.2
257
- @param[in] model The model object.
258
- @param[out] entities The entities retrieved.
259
- @related SUModelRef
260
- @return
261
- - \ref SU_ERROR_NONE on success
262
- - \ref SU_ERROR_INVALID_INPUT if \p model is an invalid object
263
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p entities is `NULL`
264
- */
265
- SU_RESULT SUModelGetActiveEntities(SUModelRef model, SUEntitiesRef* entities);
266
-
267
- /**
268
- @brief Retrieves the instance path of the active context
269
- (open group or component).
270
- @note This method only works from within the SketchUp application.
271
- @param[in] model The model object.
272
- @param[out] instance_path The instance path retrieved. This must be released to
273
- avoid memory leak.
274
- @related SUModelRef
275
- @return
276
- - \ref SU_ERROR_NONE on success
277
- - \ref SU_ERROR_INVALID_INPUT if \p model is an invalid object
278
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p instance_path is `NULL`
279
- - \ref SU_ERROR_OVERWRITE_VALID if \p instance_path is already a valid object
280
- - \ref SU_ERROR_NO_DATA if there is no active path open.
281
- - \ref SU_ERROR_NO_DATA if this isn't called from within SketchUp
282
- */
283
- SU_RESULT SUModelGetActivePath(SUModelRef model, SUInstancePathRef* instance_path);
284
-
285
- /**
286
- @brief Retrieves the number of materials in a model object.
287
- @param[in] model The model object.
288
- @param[out] count The number of material objects available.
289
- @related SUModelRef
290
- @return
291
- - \ref SU_ERROR_NONE on success
292
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
293
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
294
- */
295
- SU_RESULT SUModelGetNumMaterials(SUModelRef model, size_t* count);
296
-
297
- /**
298
- @brief Retrieves all the materials associated with a model object.
299
- @param[in] model The model object.
300
- @param[in] len The number of material objects to retrieve.
301
- @param[out] materials The material objects retrieved.
302
- @param[out] count The number of material objects retrieved.
303
- @related SUModelRef
304
- @return
305
- - \ref SU_ERROR_NONE on success
306
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
307
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if materials or count is NULL
308
- */
309
- SU_RESULT SUModelGetMaterials(
310
- SUModelRef model, size_t len, SUMaterialRef materials[], size_t* count);
311
-
312
- /**
313
- * @brief Retrieves the environments collection in the model.
314
- * @since SketchUp 2025.0, API 13.0
315
- * @param[in] model The model object.
316
- * @param[out] environments The environments collection retrieved.
317
- * @related SUModelRef
318
- * @return
319
- * - \ref SU_ERROR_NONE on success
320
- * - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
321
- * - \ref SU_ERROR_NULL_POINTER_OUTPUT if environments is NULL
322
- */
323
- SU_RESULT SUModelGetEnvironments(SUModelRef model, SUEnvironmentsRef* environments);
324
-
325
- /**
326
- @brief Adds materials to a model object. Note that the materials cannot be
327
- already owned.
328
- @param[in,out] model The model object.
329
- @param[in] len The number of material objects to add.
330
- @param[in] materials The array of material objects to add.
331
- @related SUModelRef
332
- @return
333
- - \ref SU_ERROR_NONE on success
334
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
335
- - \ref SU_ERROR_NULL_POINTER_INPUT if materials is NULL
336
- - \ref SU_ERROR_PARTIAL_SUCCESS if any of the materials are already owned
337
- */
338
- SU_RESULT SUModelAddMaterials(SUModelRef model, size_t len, const SUMaterialRef materials[]);
339
-
340
- /**
341
- @brief Loads a material from a SKM file.
342
-
343
- If a matching material exists in the model it will be returned instead.
344
-
345
- @since SketchUp 2021.1, API 9.1
346
- @param[in,out] model The model object.
347
- @param[in] file_path The location to load the material from. Assumed to be
348
- UTF-8 encoded.
349
- @param[out] material The material object.
350
- @related SUModelRef
351
- @return
352
- - \ref SU_ERROR_NONE on success
353
- - \ref SU_ERROR_INVALID_INPUT if \p model is not a valid object
354
- - \ref SU_ERROR_NULL_POINTER_INPUT if \p file_path is NULL
355
- - \ref SU_ERROR_OVERWRITE_VALID if \p material is already a valid object
356
- - \ref SU_ERROR_SERIALIZATION if the serialization operation itself fails
357
- */
358
- SU_RESULT SUModelLoadMaterial(SUModelRef model, const char* file_path, SUMaterialRef* material);
359
-
360
- /**
361
- @brief Retrieves the number of components associated with a model.
362
- @param[in] model The model object.
363
- @param[out] count The number of components available.
364
- @related SUModelRef
365
- @return
366
- - \ref SU_ERROR_NONE on success
367
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
368
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
369
- */
370
- SU_RESULT SUModelGetNumComponentDefinitions(SUModelRef model, size_t* count);
371
-
372
- /**
373
- @brief Retrieves the component definitions that define component instances but
374
- not groups.
375
- @param[in] model The model object.
376
- @param[in] len The number of component definitions to retrieve.
377
- @param[out] definitions The component definitions retrieved.
378
- @param[out] count The number of component definitions retrieved.
379
- @related SUModelRef
380
- @return
381
- - \ref SU_ERROR_NONE on success
382
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
383
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if definitions or count is NULL
384
- */
385
- SU_RESULT SUModelGetComponentDefinitions(
386
- SUModelRef model, size_t len, SUComponentDefinitionRef definitions[], size_t* count);
387
-
388
- /**
389
- @brief Retrieves the number of component definitions that define groups.
390
- @since SketchUp 2016, API 4.0
391
- @param[in] model The model object.
392
- @param[out] count The number of component definitions available.
393
- @related SUModelRef
394
- @return
395
- - \ref SU_ERROR_NONE on success
396
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
397
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
398
- */
399
- SU_RESULT SUModelGetNumGroupDefinitions(SUModelRef model, size_t* count);
400
-
401
- /**
402
- @brief Retrieves the component definitions that define groups.
403
- @since SketchUp 2016, API 4.0
404
- @param[in] model The model object.
405
- @param[in] len The number of component definitions to retrieve.
406
- @param[out] definitions The component definitions retrieved.
407
- @param[out] count The number of component definitions retrieved.
408
- @related SUModelRef
409
- @return
410
- - \ref SU_ERROR_NONE on success
411
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
412
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if definitions or count is NULL
413
- */
414
- SU_RESULT SUModelGetGroupDefinitions(
415
- SUModelRef model, size_t len, SUComponentDefinitionRef definitions[], size_t* count);
416
-
417
- /**
418
- @brief Retrieves the number of component definitions that define images.
419
- @since SketchUp 2019, API 7.0
420
- @param[in] model The model object.
421
- @param[out] count The number of component definitions available.
422
- @related SUModelRef
423
- @return
424
- - \ref SU_ERROR_NONE on success
425
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
426
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
427
- */
428
- SU_RESULT SUModelGetNumImageDefinitions(SUModelRef model, size_t* count);
429
-
430
- /**
431
- @brief Retrieves the component definitions that define images.
432
- @since SketchUp 2019, API 7.0
433
- @param[in] model The model object.
434
- @param[in] len The number of component definitions to retrieve.
435
- @param[out] definitions The component definitions retrieved.
436
- @param[out] count The number of component definitions retrieved.
437
- @related SUModelRef
438
- @return
439
- - \ref SU_ERROR_NONE on success
440
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
441
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if definitions or count is NULL
442
- */
443
- SU_RESULT SUModelGetImageDefinitions(
444
- SUModelRef model, size_t len, SUComponentDefinitionRef definitions[], size_t* count);
445
-
446
- /**
447
- @brief Adds component definitions to a model object.
448
- @param[in,out] model The model object.
449
- @param[in] len The number of component definitions to add.
450
- @param[in] components The array of component definitions to add.
451
- @related SUModelRef
452
- @return
453
- - \ref SU_ERROR_NONE on success
454
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
455
- - \ref SU_ERROR_NULL_POINTER_INPUT if components is NULL
456
- */
457
- SU_RESULT SUModelAddComponentDefinitions(
458
- SUModelRef model, size_t len, const SUComponentDefinitionRef components[]);
459
-
460
- /**
461
- @brief Remove definitions of components, images, and groups from a model object.
462
- All component definitions, their geometry, and attached instances will be
463
- released.
464
- @since SketchUp 2019.2, API 7.1
465
- @param[in,out] model The model object.
466
- @param[in] len The number of component definitions to remove.
467
- @param[in] components The array of component definitions to remove.
468
- @related SUModelRef
469
- @return
470
- - \ref SU_ERROR_NONE on success
471
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
472
- - \ref SU_ERROR_OUT_OF_RANGE if the number of components is less than one
473
- - \ref SU_ERROR_NULL_POINTER_INPUT if components is NULL
474
- - \ref SU_ERROR_PARTIAL_SUCCESS if removing a component definition fails
475
- mid-process
476
- */
477
- SU_RESULT SUModelRemoveComponentDefinitions(
478
- SUModelRef model, size_t len, SUComponentDefinitionRef components[]);
479
-
480
- /**
481
- @brief Saves the model to a file.
482
- @note Prior to SketchUp 2019.2, API 7.1 this function did not generate a new
483
- model GUID.
484
- @param[in] model The model object.
485
- @param[in] file_path The file path destination of the serialization operation.
486
- Assumed to be UTF-8 encoded.
487
- @related SUModelRef
488
- @return
489
- - \ref SU_ERROR_NONE on success
490
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
491
- - \ref SU_ERROR_NULL_POINTER_INPUT if file_path is NULL
492
- - \ref SU_ERROR_SERIALIZATION if the serialization operation itself fails
493
- */
494
- SU_RESULT SUModelSaveToFile(SUModelRef model, const char* file_path);
495
-
496
- /**
497
- @brief Saves the model to a file using a specific SketchUp version format.
498
- @note Prior to SketchUp 2019.2, API 7.1 this function did not generate a new
499
- model GUID.
500
- @since SketchUp 2014, API 2.0
501
- @param[in] model The model object.
502
- @param[in] file_path The file path destination of the serialization operation.
503
- Assumed to be UTF-8 encoded.
504
- @param[in] version The SKP file format version to use when saving.
505
- @related SUModelRef
506
- @return
507
- - \ref SU_ERROR_NONE on success
508
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
509
- - \ref SU_ERROR_MODEL_VERSION if version is invalid
510
- - \ref SU_ERROR_NULL_POINTER_INPUT if file_path is NULL
511
- - \ref SU_ERROR_SERIALIZATION if the serialization operation itself fails
512
- */
513
- SU_RESULT SUModelSaveToFileWithVersion(
514
- SUModelRef model, const char* file_path, enum SUModelVersion version);
515
-
516
- /**
517
- @brief Retrieves the camera of a model object. The returned camera object
518
- points to model's internal camera. So it must not be released via
519
- SUCameraRelease().
520
- @param[in] model The model object.
521
- @param[out] camera The camera object retrieved.
522
- @related SUModelRef
523
- @return
524
- - \ref SU_ERROR_NONE on success
525
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
526
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if camera is NULL
527
- */
528
- SU_RESULT SUModelGetCamera(SUModelRef model, SUCameraRef* camera);
529
-
530
- /**
531
- @brief Sets the current camera of a model object.
532
- @since SketchUp 2016, API 4.0
533
- @param[in,out] model The model object.
534
- @param[in,out] camera The camera object. This reference will become invalid when
535
- this function returns.
536
- @related SUModelRef
537
- @return
538
- - \ref SU_ERROR_NONE on success
539
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
540
- - \ref SU_ERROR_INVALID_INPUT if camera is not a valid object
541
- - \ref SU_ERROR_NULL_POINTER_INPUT if camera is NULL
542
- */
543
- SU_RESULT SUModelSetCamera(SUModelRef model, SUCameraRef* camera);
544
-
545
- /**
546
- @brief Retrieves the number of scene cameras of a model object.
547
- @param[in] model The model object.
548
- @param[out] num_scenes The number of scenes available.
549
- @related SUModelRef
550
- @return
551
- - \ref SU_ERROR_NONE on success
552
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
553
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if num_scenes is NULL
554
- */
555
- SU_RESULT SUModelGetNumScenes(SUModelRef model, size_t* num_scenes);
556
-
557
- /**
558
- @brief Retrieves the number of layers in a model object.
559
- @note This counts all layers regardless of whether or not they are contained
560
- in a \ref SULayerFolderRef.
561
- @param[in] model The model object.
562
- @param[out] count The number of layers available.
563
- @related SUModelRef
564
- @see SUModelGetNumTopLevelLayers()
565
- @return
566
- - \ref SU_ERROR_NONE on success
567
- - \ref SU_ERROR_INVALID_INPUT of model is not a valid object
568
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
569
- */
570
- SU_RESULT SUModelGetNumLayers(SUModelRef model, size_t* count);
571
-
572
- /**
573
- @brief Retrieves the layers in a model object.
574
- @note This retrieves all layers regardless of whether or not they are contained
575
- in a \ref SULayerFolderRef.
576
- @param[in] model The model object.
577
- @param[in] len The number of layers to retrieve.
578
- @param[out] layers The layers retrieved.
579
- @param[out] count The number of layers retrieved.
580
- @related SUModelRef
581
- @see SUModelGetTopLevelLayers()
582
- @return
583
- - \ref SU_ERROR_NONE on success
584
- - \ref SU_ERROR_INVALID_INPUT of model is not a valid object
585
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if layers or count is NULL
586
- */
587
- SU_RESULT SUModelGetLayers(SUModelRef model, size_t len, SULayerRef layers[], size_t* count);
588
-
589
- /**
590
- @brief Adds layer objects to a model object.
591
- @param[in,out] model The model object.
592
- @param[in] len The number of layers to add.
593
- @param[in] layers The layers to add.
594
- @related SUModelRef
595
- @return
596
- - \ref SU_ERROR_NONE on success
597
- - \ref SU_ERROR_INVALID_INPUT of model is not a valid object
598
- - \ref SU_ERROR_INVALID_INPUT if any item in layers is not a valid object
599
- */
600
- SU_RESULT SUModelAddLayers(SUModelRef model, size_t len, const SULayerRef layers[]);
601
-
602
- /**
603
- @brief Retrieves the default layer object of a model object.
604
- @param[in] model The model object.
605
- @param[out] layer The layer object retrieved.
606
- @related SUModelRef
607
- @return
608
- - \ref SU_ERROR_NONE on success
609
- - \ref SU_ERROR_INVALID_INPUT of model is not a valid object
610
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if layer is NULL
611
- */
612
- SU_RESULT SUModelGetDefaultLayer(SUModelRef model, SULayerRef* layer);
613
-
614
- /**
615
- @brief Removes all layers provided in the array. The default layer cannot be
616
- removed. All entities on the deleted layers will be moved to the default layer.
617
- @since SketchUp 2019.2 API 7.1
618
- @param[in,out] model The model object.
619
- @param[in] len The length of the array.
620
- @param[in] layers The layers to be deleted.
621
- @related SUModelRef
622
- @return
623
- - \ref SU_ERROR_NONE on success
624
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
625
- - \ref SU_ERROR_NULL_POINTER_INPUT if layers is NULL
626
- - \ref SU_ERROR_OUT_OF_RANGE if len is less than one.
627
- - \ref SU_ERROR_PARTIAL_SUCCESS if removing the layers failed mid-process
628
- */
629
- SU_RESULT SUModelRemoveLayers(SUModelRef model, size_t len, SULayerRef layers[]);
630
-
631
- /**
632
- @brief Retrieves the active layer object of a model object.
633
- @since SketchUp 2020, API 8.0
634
- @param[in] model The model object.
635
- @param[out] layer The layer object retrieved.
636
- @related SUModelRef
637
- @return
638
- - \ref SU_ERROR_NONE on success
639
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
640
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if layer is NULL
641
- */
642
- SU_RESULT SUModelGetActiveLayer(SUModelRef model, SULayerRef* layer);
643
-
644
- /**
645
- @brief Sets the active layer object of a model object.
646
- @since SketchUp 2020, API 8.0
647
- @param[in,out] model The model object.
648
- @param[in] layer The layer object to be set as the active layer.
649
- @related SUModelRef
650
- @return
651
- - \ref SU_ERROR_NONE on success
652
- - \ref SU_ERROR_INVALID_ARGUMENT if layer doesn't belong to model
653
- - \ref SU_ERROR_INVALID_INPUT if model or layer is not a valid object
654
- */
655
- SU_RESULT SUModelSetActiveLayer(SUModelRef model, SULayerRef layer);
656
-
657
- /**
658
- @brief Retrieves the version of a model object. The version consists of three
659
- numbers: major version number, minor version number, and the build number.
660
- @param[in] model The model object.
661
- @param[out] major The major version number retrieved.
662
- @param[out] minor The minor version number retrieved.
663
- @param[out] build The build version number retrieved.
664
- @related SUModelRef
665
- @return
666
- - \ref SU_ERROR_NONE on success
667
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
668
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if major, minor, or build is NULL
669
- */
670
- SU_RESULT SUModelGetVersion(SUModelRef model, int* major, int* minor, int* build);
671
-
672
- /**
673
- @brief Retrieves the number of attribute dictionaries of a model object.
674
- @param[in] model The model object.
675
- @param[out] count The number of attribute dictionaries available.
676
- @related SUModelRef
677
- @return
678
- - \ref SU_ERROR_NONE on success
679
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
680
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
681
- */
682
- SU_RESULT SUModelGetNumAttributeDictionaries(SUModelRef model, size_t* count);
683
-
684
- /**
685
- @brief Retrieves the attribute dictionaries of a model object.
686
- @param[in] model The model object.
687
- @param[in] len The number of attribute dictionaries to retrieve.
688
- @param[out] dictionaries The dictionaries retrieved.
689
- @param[out] count The number of attribute dictionaries retrieved.
690
- @related SUModelRef
691
- @return
692
- - \ref SU_ERROR_NONE on success
693
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
694
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if dictionaries or count is NULL
695
- */
696
- SU_RESULT SUModelGetAttributeDictionaries(
697
- SUModelRef model, size_t len, SUAttributeDictionaryRef dictionaries[], size_t* count);
698
-
699
- /**
700
- @brief Retrieves the attribute dictionary of a model object that has the given
701
- name. If a dictionary with the given name does not exist, one is added
702
- to the model object.
703
- @param[in] model The model object.
704
- @param[in] name The name of the attribute dictionary to retrieve. Assumed
705
- to be UTF-8 encoded.
706
- @param[out] dictionary The dictionary object retrieved.
707
- @related SUModelRef
708
- @return
709
- - \ref SU_ERROR_NONE on success
710
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
711
- - \ref SU_ERROR_NULL_POINTER_INPUT if name is NULL
712
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if dictionary is NULL
713
- */
714
- SU_RESULT SUModelGetAttributeDictionary(
715
- SUModelRef model, const char* name, SUAttributeDictionaryRef* dictionary);
716
-
717
- /**
718
- @brief Retrieves whether the model is georeferenced.
719
- @since SketchUp 2017, API 5.0
720
- @param[in] model The model object.
721
- @param[out] is_geo_ref The flag retrieved.
722
- @related SUModelRef
723
- @return
724
- - \ref SU_ERROR_NONE on success
725
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
726
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if is_used is NULL
727
- */
728
- SU_RESULT SUModelIsGeoReferenced(SUModelRef model, bool* is_geo_ref);
729
-
730
- /**
731
- @brief Retrieves the location information of a given model.
732
- @param[in] model The model object.
733
- @param[out] location The location retrieved.
734
- @related SUModelRef
735
- @return
736
- - \ref SU_ERROR_NONE on success
737
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
738
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if location is NULL
739
- */
740
- SU_RESULT SUModelGetLocation(SUModelRef model, SULocationRef* location);
741
-
742
- /**
743
- @brief Calculates the sum of all entities by type in the model.
744
-
745
- @note See \ref SUEntityType for examples on how it is defined depending on
746
- whether the code is compiled as C or C++. (Related to a bug in the original implementation).
747
-
748
- @param[in] model The model object.
749
- @param[out] statistics The SUModelStatistics() struct that will be populated
750
- with the number of each entity type in the model.
751
- @related SUModelRef
752
- @return
753
- - \ref SU_ERROR_NONE on success
754
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
755
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if statistics is NULL
756
-
757
- @see SUEntityType
758
- @see SUModelStatistics
759
- @see SUModelGetStatistics
760
-
761
- @code
762
- // Usage from a C compiler:
763
- SUModelStatistics statistics;
764
- SUModelGetStatistics(model, &statistics);
765
- std::cout << "Faces: " << statistics.entity_counts[SUEntityType_Face] << "\n";
766
- @endcode
767
-
768
- @code
769
- // Usage from a C++ compiler:
770
- SUModelStatistics statistics;
771
- SUModelGetStatistics(model, &statistics);
772
- std::cout << "Faces: " << statistics.entity_counts[SUModelStatistics::SUEntityType_Face] << "\n";
773
- @endcode
774
- */
775
- SU_RESULT SUModelGetStatistics(SUModelRef model, struct SUModelStatistics* statistics);
776
-
777
- /**
778
- @brief Georeferences the model.
779
- @param[in,out] model The model object.
780
- @param[in] latitude Latitude of the model.
781
- @param[in] longitude Longitude of the model.
782
- @param[in] altitude Altitude of the model.
783
- @param[in] is_z_value_centered Indicates if z value should be centered.
784
- @param[in] is_on_ocean_floor Indicates whether the model is on the ocean
785
- floor.
786
- @related SUModelRef
787
- @return
788
- - \ref SU_ERROR_NONE on success
789
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object or if latitude or
790
- longitude does not lie within a valid range
791
- */
792
- SU_RESULT SUModelSetGeoReference(
793
- SUModelRef model, double latitude, double longitude, double altitude, bool is_z_value_centered,
794
- bool is_on_ocean_floor);
795
-
796
- /**
797
- @brief Retrieves the rendering options of a model object.
798
- @param[in] model The model object.
799
- @param[out] rendering_options The rendering options object retrieved. This
800
- object is owned by the model and must not be
801
- explicitly released.
802
- @related SUModelRef
803
- @return
804
- - \ref SU_ERROR_NONE on success
805
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
806
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if rendering_options is NULL
807
- - \ref SU_ERROR_NO_DATA if no rendering options is available
808
- */
809
- SU_RESULT SUModelGetRenderingOptions(SUModelRef model, SURenderingOptionsRef* rendering_options);
810
-
811
- /**
812
- @brief Retrieves the shadow info of a model object.
813
- @since SketchUp 2015, API 3.0
814
- @param[in] model The model object.
815
- @param[out] shadow_info The shadow info object retrieved. This object is owned
816
- by the model and must not be explicitly released.
817
- @related SUModelRef
818
- @return
819
- - \ref SU_ERROR_NONE on success
820
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
821
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if shadow_info is NULL
822
- - \ref SU_ERROR_NO_DATA if no shadow info is available
823
- */
824
- SU_RESULT SUModelGetShadowInfo(SUModelRef model, SUShadowInfoRef* shadow_info);
825
-
826
- /**
827
- @brief Retrieves options manager associated with the model.
828
- @param[in] model The model object.
829
- @param[out] options_manager The options manager object retrieved.
830
- @related SUModelRef
831
- @return
832
- - \ref SU_ERROR_NONE on success
833
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
834
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if options_manager is NULL
835
- */
836
- SU_RESULT SUModelGetOptionsManager(SUModelRef model, SUOptionsManagerRef* options_manager);
837
-
838
- /**
839
- @brief Retrieves the angle which will rotate the north direction to the y-axis
840
- for a given model.
841
- @param[in] model The model object.
842
- @param[out] north_correction The north correction angle retrieved (in degrees).
843
- @related SUModelRef
844
- @return
845
- - \ref SU_ERROR_NONE on success
846
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
847
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if north_angle is NULL
848
- */
849
- SU_RESULT SUModelGetNorthCorrection(SUModelRef model, double* north_correction);
850
-
851
- /**
852
- @brief Merges all adjacent, coplanar faces in the model.
853
- @param[in,out] model The model object.
854
- @related SUModelRef
855
- @return
856
- - \ref SU_ERROR_NONE on success
857
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid
858
- */
859
- SU_RESULT SUModelMergeCoplanarFaces(SUModelRef model);
860
-
861
- /**
862
- @brief Retrieves all the scenes associated with a model object.
863
- @param[in] model The model object.
864
- @param[in] len The number of scene objects to retrieve.
865
- @param[out] scenes The scene objects retrieved.
866
- @param[out] count The number of scene objects retrieved.
867
- @related SUModelRef
868
- @return
869
- - \ref SU_ERROR_NONE on success
870
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
871
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if scenes or count is NULL
872
- - \ref SU_ERROR_OVERWRITE_VALID if any element of scenes is already a valid
873
- object
874
- - \ref SU_ERROR_NO_DATA if there are no scene objects to retrieve.
875
- */
876
- SU_RESULT SUModelGetScenes(SUModelRef model, size_t len, SUSceneRef scenes[], size_t* count);
877
-
878
- /**
879
- @brief Retrieves the scenes with the given name associated with a model object.
880
- @param[in] model The model object.
881
- @param[in] name The name of scene object to retrieve.
882
- @param[out] scene The scene object retrieved.
883
- @related SUModelRef
884
- @return
885
- - \ref SU_ERROR_NONE on success
886
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
887
- - \ref SU_ERROR_NULL_POINTER_INPUT if name is NULL
888
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if scene is NULL
889
- - \ref SU_ERROR_NO_DATA if there are no scene objects to retrieve.
890
- */
891
- SU_RESULT SUModelGetSceneWithName(SUModelRef model, const char* name, SUSceneRef* scene);
892
-
893
- /**
894
- @brief Adds scenes to a model object.
895
-
896
- @warning Breaking Change: The behavior of SUModelAddScenes changed in
897
- SketchUp SDK 2018 API 6.0 to return SU_ERROR_INVALID_ARGUMENT if at
898
- least one scene name already exists in the model or if there are
899
- duplicated names in the scenes array.
900
-
901
- @note When adding a scene the current state of the model is saved to the scene
902
- based on the \ref SUSceneFlags set on the scene prior to adding it.
903
-
904
- @param[in,out] model The model object.
905
- @param[in] len The number of scene objects to add.
906
- @param[in] scenes The array of scene objects to add.
907
- @related SUModelRef
908
- @return
909
- - \ref SU_ERROR_NONE on success
910
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
911
- - \ref SU_ERROR_NULL_POINTER_INPUT if scenes is NULL
912
- - \ref SU_ERROR_INVALID_ARGUMENT if the names of the given scenes are not unique
913
- among themselves or among existing scenes
914
- */
915
- SU_RESULT SUModelAddScenes(SUModelRef model, size_t len, const SUSceneRef scenes[]);
916
-
917
- /**
918
- @brief Adds scenes to a model object.
919
-
920
- @warning Breaking Change: The behavior of SUModelAddScene changed in
921
- SketchUp SDK 2018 API 6.0 to return SU_ERROR_INVALID_ARGUMENT if the
922
- given scene name already exists in the model.
923
-
924
- @param[in,out] model The model object.
925
- @param[in] index Where in the list to add the scene. -1 to place at the end.
926
- @param[in] scene The scene object to add.
927
- @param[out] out_index The index that the scene was added at.
928
- @related SUModelRef
929
- @return
930
- - \ref SU_ERROR_NONE on success
931
- - \ref SU_ERROR_INVALID_INPUT if model or scene are not a valid object
932
- - \ref SU_ERROR_INVALID_ARGUMENT if a scene with the same name already exists
933
- */
934
- SU_RESULT SUModelAddScene(SUModelRef model, int index, SUSceneRef scene, int* out_index);
935
-
936
- /**
937
- @brief Reorder \p scene based on \p new_index to \p model object.
938
- @since SketchUp 2025.0, API 13.0
939
- @param[in,out] model The \p model object.
940
- @param[in] scene The \p scene object to reorder.
941
- @param[in] new_index The \p new_index where the scene should be placed.
942
- @related SUModelRef
943
- @return
944
- - \ref SU_ERROR_NONE on success
945
- - \ref SU_ERROR_INVALID_INPUT if \p model or \p scene are not a valid object
946
- - \ref SU_ERROR_INVALID_ARGUMENT if \p scene does not exists within \p model
947
- - \ref SU_ERROR_OUT_OF_RANGE if the \p new_index is greater than the number of scenes in the model
948
- */
949
- SU_RESULT SUModelReorderScene(SUModelRef model, SUSceneRef scene, size_t new_index);
950
-
951
- /**
952
- @brief Retrieves the active scene associated with a model object.
953
- @since SketchUp 2016, API 4.0
954
- @param[in] model The model object.
955
- @param[out] scene The scene object retrieved.
956
- @related SUModelRef
957
- @return
958
- - \ref SU_ERROR_NONE on success
959
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
960
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if scene is NULL
961
- - \ref SU_ERROR_OVERWRITE_VALID if scene is already a valid object
962
- - \ref SU_ERROR_NO_DATA if there is no active scene to retrieve
963
- */
964
- SU_RESULT SUModelGetActiveScene(SUModelRef model, SUSceneRef* scene);
965
-
966
- /**
967
- @brief Sets the provided scene as the active scene.
968
- @since SketchUp 2016, API 4.0
969
- @param[in,out] model The model object.
970
- @param[in] scene The scene object to be set as the active scene.
971
- @related SUModelRef
972
- @return
973
- - \ref SU_ERROR_NONE on success
974
- - \ref SU_ERROR_INVALID_INPUT if model or scene is not a valid object
975
- - \ref SU_ERROR_GENERIC if try to activate a scene which is not in the model
976
- */
977
- SU_RESULT SUModelSetActiveScene(SUModelRef model, SUSceneRef scene);
978
-
979
- /**
980
- @brief Adds a single matched photo scene to a model object.
981
- @since SketchUp 2015, API 3.0
982
- @param[in,out] model The model object.
983
- @param[in] image_file The full path of the image associated with this scene.
984
- @param[in] camera The camera associated with this scene.
985
- @param[in] scene_name The name of the scene to add.
986
- @param[out] scene The scene object created.
987
- @related SUModelRef
988
- @return
989
- - \ref SU_ERROR_NONE on success
990
- - \ref SU_ERROR_INVALID_INPUT if model or camera is not a valid object
991
- - \ref SU_ERROR_NULL_POINTER_INPUT if scene_name or image_file is NULL
992
- - \ref SU_ERROR_INVALID_OUTPUT if scene is NULL
993
- - \ref SU_ERROR_GENERIC if image_file is invalid or not found
994
- */
995
- SU_RESULT SUModelAddMatchPhotoScene(
996
- SUModelRef model, const char* image_file, SUCameraRef camera, const char* scene_name,
997
- SUSceneRef* scene);
998
-
999
- /**
1000
- @brief Retrieves the name of a model object.
1001
- @param[in] model The model object.
1002
- @param[out] name The destination of the retrieved name object.
1003
- @related SUModelRef
1004
- @return
1005
- - \ref SU_ERROR_NONE on success
1006
- - \ref SU_ERROR_INVALID_INPUT if model is an invalid object
1007
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if name is NULL
1008
- - \ref SU_ERROR_INVALID_OUTPUT if name does not point to a valid \ref
1009
- SUStringRef object
1010
- */
1011
- SU_RESULT SUModelGetName(SUModelRef model, SUStringRef* name);
1012
-
1013
- /**
1014
- @brief Sets the name of a model object.
1015
- @param[in,out] model The model object.
1016
- @param[in] name The name of the model object. Assumed to be UTF-8 encoded.
1017
- @related SUModelRef
1018
- @return
1019
- - \ref SU_ERROR_NONE on success
1020
- - \ref SU_ERROR_INVALID_INPUT if model is an invalid object
1021
- - \ref SU_ERROR_NULL_POINTER_INPUT if name is NULL
1022
- */
1023
- SU_RESULT SUModelSetName(SUModelRef model, const char* name);
1024
-
1025
- /**
1026
- @brief Retrieves the file path of a model object.
1027
- @since SketchUp 2018, API 6.0
1028
- @param[in] model The model object.
1029
- @param[out] path The destination of the retrieved path object.
1030
- @related SUModelRef
1031
- @return
1032
- - \ref SU_ERROR_NONE on success
1033
- - \ref SU_ERROR_INVALID_INPUT if model is an invalid object
1034
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if path is NULL
1035
- - \ref SU_ERROR_INVALID_OUTPUT if path does not point to a valid \ref
1036
- SUStringRef object
1037
- */
1038
- SU_RESULT SUModelGetPath(SUModelRef model, SUStringRef* path);
1039
-
1040
- /**
1041
- @brief Retrieves the title of a model object.
1042
- @since SketchUp 2018, API 6.0
1043
- @param[in] model The model object.
1044
- @param[out] title The destination of the retrieved title object.
1045
- @related SUModelRef
1046
- @return
1047
- - \ref SU_ERROR_NONE on success
1048
- - \ref SU_ERROR_INVALID_INPUT if model is an invalid object
1049
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if title is NULL
1050
- - \ref SU_ERROR_INVALID_OUTPUT if title does not point to a valid \ref
1051
- SUStringRef object
1052
- */
1053
- SU_RESULT SUModelGetTitle(SUModelRef model, SUStringRef* title);
1054
-
1055
- /**
1056
- @brief Retrieves the description of a model object.
1057
- @param[in] model The model object.
1058
- @param[out] description The destination of the retrieved description object.
1059
- @related SUModelRef
1060
- @return
1061
- - \ref SU_ERROR_NONE on success
1062
- - \ref SU_ERROR_INVALID_INPUT if model is an invalid object
1063
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if description is NULL
1064
- - \ref SU_ERROR_INVALID_OUTPUT if description does not point to a valid \ref
1065
- SUStringRef object
1066
- */
1067
- SU_RESULT SUModelGetDescription(SUModelRef model, SUStringRef* description);
1068
-
1069
- /**
1070
- @brief Sets the description of a model object.
1071
- @param[in,out] model The model object.
1072
- @param[in] description The description of the model object. Assumed to be UTF-8
1073
- encoded.
1074
- @related SUModelRef
1075
- @return
1076
- - \ref SU_ERROR_NONE on success
1077
- - \ref SU_ERROR_INVALID_INPUT if model is an invalid object
1078
- - \ref SU_ERROR_NULL_POINTER_INPUT if description is NULL
1079
- */
1080
- SU_RESULT SUModelSetDescription(SUModelRef model, const char* description);
1081
-
1082
- /**
1083
- @brief Returns the units associated with the given model.
1084
- @param[in] model The model object.
1085
- @param[out] units The units retrieved.
1086
- @related SUModelRef
1087
- @return
1088
- - \ref SU_ERROR_NONE on success
1089
- - \ref SU_ERROR_INVALID_INPUT if model is an invalid object
1090
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if the units argument is invalid
1091
- */
1092
- SU_RESULT SUModelGetUnits(SUModelRef model, enum SUModelUnits* units);
1093
-
1094
- /**
1095
- @brief Retrieves the classifications of a model object.
1096
- @param[in] model The model object.
1097
- @param[out] classifications The classifications object retrieved.
1098
- @related SUModelRef
1099
- @return
1100
- - \ref SU_ERROR_NONE on success
1101
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
1102
- - \ref SU_ERROR_NULL_POINTER_INPUT if classifications is NULL
1103
- */
1104
- SU_RESULT SUModelGetClassifications(SUModelRef model, SUClassificationsRef* classifications);
1105
-
1106
- /**
1107
- @brief Retrieves the axes of a model object.
1108
- @param[in] model The model object.
1109
- @param[out] axes The axes object retrieved.
1110
- @related SUModelRef
1111
- @return
1112
- - \ref SU_ERROR_NONE on success
1113
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
1114
- - \ref SU_ERROR_NULL_POINTER_INPUT if axes is NULL
1115
- */
1116
- SU_RESULT SUModelGetAxes(SUModelRef model, SUAxesRef* axes);
1117
-
1118
- /**
1119
- @brief Retrieves the styles of a model object.
1120
- @since SketchUp 2017, API 5.0
1121
- @param[in] model The model object.
1122
- @param[out] styles The styles object retrieved.
1123
- @related SUModelRef
1124
- @return
1125
- - \ref SU_ERROR_NONE on success
1126
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
1127
- - \ref SU_ERROR_NULL_POINTER_INPUT if manager is NULL
1128
- */
1129
- SU_RESULT SUModelGetStyles(SUModelRef model, SUStylesRef* styles);
1130
-
1131
- /**
1132
- @brief Retrieves the instance path (including an entity) corresponding
1133
- to a given persistent id.
1134
- @param[in] model The model object.
1135
- @param[in] pid_ref Persistent id of the entity.
1136
- @param[out] instance_path_ref Instance path to the entity.
1137
- @related SUModelRef
1138
- @note Starting in SketchUp 2020.1, API 8.1, SU_ERROR_NO_DATA will be returned
1139
- if pid_ref isn't a valid instance path in the model.
1140
- @return
1141
- - \ref SU_ERROR_NONE on success
1142
- - \ref SU_ERROR_INVALID_INPUT if model or pid_ref are not a valid object
1143
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if instance_path_ref is NULL
1144
- - \ref SU_ERROR_NO_DATA if the persistent id path didn't exist in the model
1145
- - \ref SU_ERROR_INVALID_OUTPUT if instance_path_ref is not a valid object
1146
- - \ref SU_ERROR_PARTIAL_SUCCESS if an instance path can not be is fully traced
1147
- - \ref SU_ERROR_GENERIC on general failure
1148
- */
1149
- SU_RESULT SUModelGetInstancePathByPid(
1150
- SUModelRef model, SUStringRef pid_ref, SUInstancePathRef* instance_path_ref);
1151
-
1152
- /**
1153
- @brief Retrieves the number of fonts in a model object.
1154
- @since SketchUp 2017, API 5.0
1155
- @param[in] model The model object.
1156
- @param[out] count The number of font objects available.
1157
- @related SUModelRef
1158
- @return
1159
- - \ref SU_ERROR_NONE on success
1160
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
1161
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
1162
- */
1163
- SU_RESULT SUModelGetNumFonts(SUModelRef model, size_t* count);
1164
-
1165
- /**
1166
- @brief Retrieves all the fonts associated with a model object.
1167
- @note The returned font references may become invalid if another font is
1168
- assigned to objects using them later.
1169
- @since SketchUp 2017, API 5.0
1170
- @param[in] model The model object.
1171
- @param[in] len The number of font objects to retrieve.
1172
- @param[out] fonts The font objects retrieved.
1173
- @param[out] count The number of font objects retrieved.
1174
- @related SUModelRef
1175
- @return
1176
- - \ref SU_ERROR_NONE on success
1177
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
1178
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if fonts or count is NULL
1179
- */
1180
- SU_RESULT SUModelGetFonts(SUModelRef model, size_t len, SUFontRef fonts[], size_t* count);
1181
-
1182
- /**
1183
- @brief Current version of the SUFontInfo struct
1184
- @related SUFontRef
1185
- */
1186
- #define SU_FONT_INFO_VERSION 1
1187
-
1188
- /**
1189
- @struct SUFontInfo
1190
- @brief Information about the font that is to be created by SUModelAddFont.
1191
- @since SketchUp 2026.0, API 14.0
1192
- @related SUFontRef
1193
- */
1194
- struct SUFontInfo {
1195
- /**
1196
- Version of the SUFontInfo struct. Must be set to SU_FONT_INFO_VERSION.
1197
- */
1198
- unsigned int version;
1199
-
1200
- /**
1201
- Name of the font. Assumed to be UTF-8 encoded.
1202
- */
1203
- const char* font_name;
1204
-
1205
- /**
1206
- Boldness of the font (true for bold, false for normal).
1207
- */
1208
- bool is_bold;
1209
-
1210
- /**
1211
- Italic (true for italic, false for normal).
1212
- */
1213
- bool is_italic;
1214
-
1215
- /**
1216
- 2D font size in screen points (when use_world_size is false).
1217
- */
1218
- int point_size;
1219
-
1220
- /**
1221
- Which sizing style to use.
1222
-
1223
- - true: font size scales relative to in-model 3D objects.
1224
- - false: font size stays constant on user's screen.
1225
- */
1226
- bool use_world_size;
1227
-
1228
- /**
1229
- 3D font size in inches (when use_world_size is true).
1230
- */
1231
- double world_size;
1232
- };
1233
-
1234
- /**
1235
- @brief Returns an object reference to a font object based on font_info.
1236
- @note The returned font reference may be for either an existing object in the
1237
- model or a new in-model object if none existed previously. It may also
1238
- become invalid if assigned to an object which later has a different font
1239
- assigned to it.
1240
- @since SketchUp 2026.0, API 14.0
1241
- @param[in] model_ref The model font is to be associated with.
1242
- @param[in] font_info Struct that defines all parameters of the new font.
1243
- @param[out] added_font_ref The font object returned.
1244
- @related SUFontRef
1245
- @return
1246
- - \ref SU_ERROR_NONE on success
1247
- - \ref SU_ERROR_INVALID_INPUT if \p model_ref is not a valid object
1248
- - \ref SU_ERROR_NULL_POINTER_INPUT if \p font_info is NULL
1249
- - \ref SU_ERROR_INVALID_ARGUMENT if \p font_info contains invalid data
1250
- - \ref SU_ERROR_OUT_OF_RANGE if \p font_info contains values that are out of range
1251
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p added_font_ref is NULL
1252
- - \ref SU_ERROR_OVERWRITE_VALID if \p added_font_ref already references a valid object
1253
- */
1254
- SU_RESULT SUModelAddFont(
1255
- SUModelRef model_ref, const struct SUFontInfo* font_info, SUFontRef* added_font_ref);
1256
-
1257
- /**
1258
- @brief Retrieves the dimension style associated with a model object.
1259
- @since SketchUp 2017, API 5.0
1260
- @param[in] model The model object.
1261
- @param[out] style The dimension style retrieved.
1262
- @related SUModelRef
1263
- @return
1264
- - \ref SU_ERROR_NONE on success
1265
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
1266
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if style is NULL
1267
- */
1268
- SU_RESULT SUModelGetDimensionStyle(SUModelRef model, SUDimensionStyleRef* style);
1269
-
1270
- /**
1271
- @brief Retrieves length formatter settings from the model. The given length
1272
- formatter object must have been constructed using
1273
- SULengthFormatterCreate(). It must be released using
1274
- SULengthFormatterRelease().
1275
- @since SketchUp 2018, API 6.0
1276
- @param[in] model The model object.
1277
- @param[out] formatter The formatter used to retrieve the settings.
1278
- @related SUModelRef
1279
- @return
1280
- - \ref SU_ERROR_NONE on success
1281
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
1282
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if formatter is NULL
1283
- - \ref SU_ERROR_INVALID_OUTPUT if formatter does not point to a valid \ref
1284
- SULengthFormatterRef object
1285
- */
1286
- SU_RESULT SUModelGetLengthFormatter(SUModelRef model, SULengthFormatterRef* formatter);
1287
-
1288
- /**
1289
- @brief Retrieves a unique material name from the model that is based on the
1290
- provided one. If the provided name is unique it will be returned,
1291
- otherwise any trailing indices will be replaced by a new index.
1292
- @since SketchUp 2018, API 6.0
1293
- @param[in] model The model object.
1294
- @param[in] in_name The suggested name.
1295
- @param[out] out_name The returned name.
1296
- @related SUModelRef
1297
- @return
1298
- - \ref SU_ERROR_NONE on success
1299
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
1300
- - \ref SU_ERROR_NULL_POINTER_INPUT if in_name is NULL
1301
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if out_name is NULL
1302
- - \ref SU_ERROR_INVALID_OUTPUT if out_name does not point to a valid \ref
1303
- SUStringRef object
1304
- */
1305
- SU_RESULT SUModelGenerateUniqueMaterialName(
1306
- SUModelRef model, const char* in_name, SUStringRef* out_name);
1307
-
1308
- /**
1309
- @brief Fixes any errors found in the given model.
1310
- @since SketchUp 2018, API 6.0
1311
- @param[in,out] model The model object.
1312
- @related SUModelRef
1313
- @return
1314
- - \ref SU_ERROR_NONE on success
1315
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
1316
- */
1317
- SU_RESULT SUModelFixErrors(SUModelRef model);
1318
-
1319
- /**
1320
- @brief Updates the faces in the model so that they are oriented
1321
- consistently.
1322
- @since SketchUp 2018, API 6.0
1323
- @param[in,out] model The model object.
1324
- @param[in] recurse_components Orient components of the model.
1325
- @related SUModelRef
1326
- @return
1327
- - \ref SU_ERROR_NONE on success
1328
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
1329
- */
1330
- SU_RESULT SUModelOrientFacesConsistently(SUModelRef model, bool recurse_components);
1331
-
1332
-
1333
- /**
1334
- @brief Retrieves line styles from the model.
1335
- @since SketchUp 2019, API 7.0
1336
- @param[in] model The model object.
1337
- @param[out] line_styles The line styles of the model.
1338
- @related SUModelRef
1339
- @return
1340
- - \ref SU_ERROR_NONE on success
1341
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
1342
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if line_styles is NULL
1343
- */
1344
- SU_RESULT SUModelGetLineStyles(SUModelRef model, SULineStylesRef* line_styles);
1345
-
1346
- /**
1347
- @brief Loads a component from a file.
1348
- @deprecated This method will be removed in SketchUp 2022.0. It is replaced by
1349
- SUModelLoadDefinitionWithStatus() which can load components
1350
- saved by newer versions of SketchUp.
1351
- @since SketchUp 2019.2, API 7.1
1352
- @param[in,out] model The model object.
1353
- @param[in] filename The full path and filename to a SkethchUp model.
1354
- @param[out] definition The component definition that is created after load.
1355
- @related SUModelRef
1356
- @return
1357
- - \ref SU_ERROR_NONE on success
1358
- - \ref SU_ERROR_INVALID_INPUT if \p model is not a valid object
1359
- - \ref SU_ERROR_NULL_POINTER_INPUT if \p filename is NULL
1360
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p definition is NULL
1361
- - \ref SU_ERROR_OVERWRITE_VALID if \p definition is already a valid object
1362
- - \ref SU_ERROR_SERIALIZATION if loading the file failed
1363
- */
1364
- SU_DEPRECATED_FUNCTION("SketchUp API 9.0")
1365
- SU_RESULT SUModelLoadDefinition(
1366
- SUModelRef model, const char* filename, SUComponentDefinitionRef* definition);
1367
-
1368
- /**
1369
- @brief Loads a component from a file.
1370
- @since SketchUp 2021, API 9.0
1371
-
1372
- @note As of SketchUp 2021.0, SketchUp can open .skp files created with newer versions of SketchUp.
1373
- However, opening newer versions with an older SDK might omit model data. Use the load
1374
- \p status value to check if the file was created with a newer version of SketchUp.
1375
-
1376
- @warning When reading a file created with a newer version of SketchUp, you may lose data
1377
- if you write over the same file.
1378
-
1379
- @param[in,out] model The model object.
1380
- @param[in] filename The full path and filename to a SkethchUp model.
1381
- @param[out] definition The component definition that is created after load.
1382
- @param[out] status Returns additional information on the status of a
1383
- successful operation. Valid when the return value is
1384
- \ref SU_ERROR_NONE.
1385
- @related SUModelRef
1386
- @return
1387
- - \ref SU_ERROR_NONE on success
1388
- - \ref SU_ERROR_INVALID_INPUT if \p model is not a valid object
1389
- - \ref SU_ERROR_NULL_POINTER_INPUT if \p filename is NULL
1390
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p definition is NULL
1391
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p status is NULL
1392
- - \ref SU_ERROR_OVERWRITE_VALID if \p definition is already a valid object
1393
- - \ref SU_ERROR_MODEL_VERSION if the component file has a newer version
1394
- than is supported by the current build of the SDK.
1395
- - \ref SU_ERROR_SERIALIZATION if loading the file failed
1396
- */
1397
- SU_RESULT SUModelLoadDefinitionWithStatus(
1398
- SUModelRef model, const char* filename, SUComponentDefinitionRef* definition,
1399
- enum SUModelLoadStatus* status);
1400
-
1401
- /**
1402
- @brief Removes all materials provided in the array.
1403
- @since SketchUp 2019.2, API 7.1
1404
- @param[in,out] model The model object.
1405
- @param[in] len The length of the array.
1406
- @param[in] materials The materials to be deleted.
1407
- @related SUModelRef
1408
- @return
1409
- - \ref SU_ERROR_NONE on success
1410
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
1411
- - \ref SU_ERROR_NULL_POINTER_INPUT if materials is NULL
1412
- - \ref SU_ERROR_OUT_OF_RANGE if len is zero
1413
- - \ref SU_ERROR_PARTIAL_SUCCESS if removing the materials failed mid-process
1414
- - \ref SU_ERROR_NO_DATA if materials provided are invalid
1415
- */
1416
- SU_RESULT SUModelRemoveMaterials(SUModelRef model, size_t len, SUMaterialRef materials[]);
1417
-
1418
- /**
1419
- @brief Removes selected scenes from a model.
1420
- @since SketchUp 2019.2, API 7.1
1421
- @param[in,out] model The model object.
1422
- @param[in] len The number of scenes in the array for removal.
1423
- @param[in] scenes The scenes to be deleted from the model.
1424
- @related SUModelRef
1425
- @return
1426
- - \ref SU_ERROR_NONE on success
1427
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
1428
- - \ref SU_ERROR_OUT_OF_RANGE if len is zero
1429
- - \ref SU_ERROR_PARTIAL_SUCCESS if the deletion process failed mid-process or
1430
- if not all of scenes for deletion were found in the model
1431
- - \ref SU_ERROR_NO_DATA if none of the requested scenes could be found for deletion
1432
- */
1433
- SU_RESULT SUModelRemoveScenes(SUModelRef model, size_t len, SUSceneRef scenes[]);
1434
-
1435
- /**
1436
- @brief Retrieves the number of all the materials in a model including those
1437
- belonging to SUImageRef and SULayerRef.
1438
-
1439
- @warning Materials from SUImageRef and SULayerRef should not be applied to
1440
- any other entity in the model. They are uniquely owned by the image
1441
- or layer.
1442
-
1443
- @since SketchUp 2019.2, API 7.1
1444
- @param[in] model The model object.
1445
- @param[out] count The number of material objects available.
1446
- @related SUModelRef
1447
- @return
1448
- - \ref SU_ERROR_NONE on success
1449
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
1450
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
1451
- */
1452
- SU_RESULT SUModelGetNumAllMaterials(SUModelRef model, size_t* count);
1453
-
1454
- /**
1455
- @brief Retrieves all the materials associated with a model object including
1456
- those belonging to SUImageRef and SULayerRef.
1457
-
1458
- @warning Materials from SUImageRef and SULayerRef should not be applied to
1459
- any other entity in the model. They are uniquely owned by the image
1460
- or layer.
1461
-
1462
- @since SketchUp 2019.2, API 7.1
1463
- @param[in] model The model object.
1464
- @param[in] len The number of material objects to retrieve.
1465
- @param[out] materials The material objects retrieved.
1466
- @param[out] count The number of material objects retrieved.
1467
- @related SUModelRef
1468
- @return
1469
- - \ref SU_ERROR_NONE on success
1470
- - \ref SU_ERROR_INVALID_INPUT if model is not a valid object
1471
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if materials or count is NULL
1472
- */
1473
- SU_RESULT SUModelGetAllMaterials(
1474
- SUModelRef model, size_t len, SUMaterialRef materials[], size_t* count);
1475
-
1476
- /**
1477
- @since SketchUp 2019.2, API 7.1
1478
-
1479
- @brief Retrieves the guid of a model object.
1480
-
1481
- @see SUComponentDefinitionGetGuid
1482
- @see SUSkpReadGuid
1483
-
1484
- @param[in] model The model object.
1485
- @param[out] guid The guid string.
1486
- @related SUModelRef
1487
- @return
1488
- - \ref SU_ERROR_NONE on success
1489
- - \ref SU_ERROR_INVALID_INPUT if model is an invalid object
1490
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if guid is NULL
1491
- - \ref SU_ERROR_INVALID_OUTPUT if guid does not point to a valid \ref
1492
- SUStringRef object
1493
- */
1494
- SU_RESULT SUModelGetGuid(SUModelRef model, SUStringRef* guid);
1495
-
1496
- /**
1497
- @brief Retrieves layers by their persistent ids. The layers retrieved will be in
1498
- the same order as to the peristent ids passed in. If a persistent id
1499
- doesn't belong to a layer, then a \ref SU_INVALID element will be
1500
- returned along with \ref SU_ERROR_PARTIAL_SUCCESS.
1501
- @since SketchUp 2020.0, API 8.0
1502
- @see SUModelGetEntitiesOfTypeByPersistentIDs()
1503
- @deprecated Prefer the more flexible SUModelGetEntitiesOfTypeByPersistentIDs()
1504
- which lets you narrow the search scope.
1505
- @param[in] model The model object.
1506
- @param[in] num_pids The number of persistent ids.
1507
- @param[in] pids The persistent ids.
1508
- @param[out] layers The retrieved layer objects.
1509
- @related SUModelRef
1510
- @return
1511
- - \ref SU_ERROR_NONE on success or if num_pids is zero
1512
- - \ref SU_ERROR_INVALID_INPUT if model is an invalid object
1513
- - \ref SU_ERROR_NULL_POINTER_INPUT if pids is NULL
1514
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if layer is NULL
1515
- - \ref SU_ERROR_PARTIAL_SUCCESS if one or more layers could not be found
1516
- - \ref SU_ERROR_OVERWRITE_VALID if layers contains a valid \ref SULayerRef
1517
- */
1518
- SU_DEPRECATED_FUNCTION("SketchUp API 8.2")
1519
- SU_RESULT SUModelGetLayersByPersistentIDs(
1520
- SUModelRef model, size_t num_pids, const int64_t pids[], SULayerRef layers[]);
1521
-
1522
- /**
1523
- @brief Reports whether the given \ref SUDrawingElementRef in an
1524
- \ref SUInstancePathRef is visible given the model's rendering options.
1525
- This will take into account "DrawHiddenGeometry" and "DrawHiddenObjects"
1526
- to determine if the drawing element is visible in the viewport.
1527
- @since SketchUp 2020.0, API 8.0
1528
- @param[in] model The model object.
1529
- @param[in] path The instance path to resolve visibility for.
1530
- @param[out] visible The retrieved layer objects.
1531
- @related SUModelRef
1532
- @return
1533
- - \ref SU_ERROR_NONE on success
1534
- - \ref SU_ERROR_INVALID_INPUT if model is an invalid object
1535
- - \ref SU_ERROR_INVALID_INPUT if path is an invalid object
1536
- - \ref SU_ERROR_INVALID_ARGUMENT if the instance path is not valid in the model
1537
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if visible is NULL
1538
- */
1539
- SU_RESULT SUModelIsDrawingElementVisible(SUModelRef model, SUInstancePathRef path, bool* visible);
1540
-
1541
- /**
1542
- @brief Retrieves entities by their persistent ids. The entities retrieved will
1543
- be in the same order as to the peristent ids passed in. If a persistent
1544
- id doesn't belong to a entity, then a \ref SU_INVALID element will be
1545
- returned along with \ref SU_ERROR_PARTIAL_SUCCESS.
1546
- @since SketchUp 2020.0, API 8.0
1547
- @see SUModelGetEntitiesOfTypeByPersistentIDs()
1548
- @deprecated Prefer the more flexible SUModelGetEntitiesOfTypeByPersistentIDs()
1549
- which lets you narrow the search scope.
1550
- @param[in] model The model object.
1551
- @param[in] num_pids The number of persistent ids.
1552
- @param[in] pids The persistent ids.
1553
- @param[out] entities The retrieved entity objects.
1554
- @related SUModelRef
1555
- @return
1556
- - \ref SU_ERROR_NONE on success or if num_pids is zero
1557
- - \ref SU_ERROR_INVALID_INPUT if model is an invalid object
1558
- - \ref SU_ERROR_NULL_POINTER_INPUT if pids is NULL
1559
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if model is NULL
1560
- - \ref SU_ERROR_PARTIAL_SUCCESS if one or more entities could not be found
1561
- - \ref SU_ERROR_OVERWRITE_VALID if entities contains a valid \ref SUEntityRef
1562
- */
1563
- SU_DEPRECATED_FUNCTION("SketchUp API 8.2")
1564
- SU_RESULT SUModelGetEntitiesByPersistentIDs(
1565
- SUModelRef model, size_t num_pids, const int64_t pids[], SUEntityRef entities[]);
1566
-
1567
- /**
1568
- @brief Retrieves the selection object for a model.
1569
- @note This method only works from within the SketchUp application.
1570
- @since SketchUp 2020.2, API 8.2
1571
- @param[in] model The model object.
1572
- @param[out] selection The retrieved selection object.
1573
- @related SUModelRef
1574
- @return
1575
- - \ref SU_ERROR_NONE on success
1576
- - \ref SU_ERROR_INVALID_INPUT if model is an invalid object
1577
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if selection is NULL
1578
- - \ref SU_ERROR_OVERWRITE_VALID if selection is already a valid object
1579
- - \ref SU_ERROR_NO_DATA if this isn't called from within SketchUp
1580
- */
1581
- SU_RESULT SUModelGetSelection(SUModelRef model, SUSelectionRef* selection);
1582
-
1583
- /**
1584
- @brief Gets the number of \ref SULayerFolderRef objects owned by the given
1585
- model.
1586
- @since SketchUp 2021.0, API 9.0
1587
- @param[in] model The model object.
1588
- @param[out] count The number of layer folder objects.
1589
- @related SUModelRef
1590
- @return
1591
- - \ref SU_ERROR_NONE on success
1592
- - \ref SU_ERROR_INVALID_INPUT if \p model is an invalid object
1593
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p count is NULL
1594
- */
1595
- SU_RESULT SUModelGetNumLayerFolders(SUModelRef model, size_t* count);
1596
-
1597
- /**
1598
- @brief Gets the \ref SULayerFolderRef objects that are owned by the given model.
1599
- @since SketchUp 2021.0, API 9.0
1600
- @param[in] model The model object.
1601
- @param[in] len The number of elements in \p layer_folders.
1602
- @param[out] layer_folders An array of layer folder objects.
1603
- @param[out] count The number of elements written into \p layer_folders.
1604
- @related SUModelRef
1605
- @return
1606
- - \ref SU_ERROR_NONE on success
1607
- - \ref SU_ERROR_INVALID_INPUT if \p model is an invalid object
1608
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p layer_folders or \p count is NULL
1609
- */
1610
- SU_RESULT SUModelGetLayerFolders(
1611
- SUModelRef model, size_t len, SULayerFolderRef layer_folders[], size_t* count);
1612
-
1613
- /**
1614
- @brief Removes empty \ref SULayerFolderRef objects from the model.
1615
- @since SketchUp 2021.0, API 9.0
1616
- @param[in,out] model The model object.
1617
- @param[out] count The number of empty layer folders removed. If NULL,
1618
- count will not be retrieved.
1619
- @related SUModelRef
1620
- @return
1621
- - \ref SU_ERROR_NONE on success
1622
- - \ref SU_ERROR_INVALID_INPUT if \p model is an invalid object
1623
- */
1624
- SU_RESULT SUModelPurgeEmptyLayerFolders(SUModelRef model, size_t* count);
1625
-
1626
- /**
1627
- @brief Adds a \ref SULayerFolderRef object to the model.
1628
- @since SketchUp 2021.0, API 9.0
1629
- @param[in,out] model The model object.
1630
- @param[in] layer_folder The layer folder to add.
1631
- @related SUModelRef
1632
- @return
1633
- - \ref SU_ERROR_NONE on success
1634
- - \ref SU_ERROR_INVALID_INPUT if \p model or \p layer_folder is an invalid
1635
- object
1636
- - \ref SU_ERROR_INVALID_ARGUMENT if \p layer_folder fails to be added or is
1637
- already part of the model.
1638
- */
1639
- SU_RESULT SUModelAddLayerFolder(SUModelRef model, SULayerFolderRef layer_folder);
1640
-
1641
- /**
1642
- @brief Removes unused \ref SULayerRef objects from the model.
1643
- @since SketchUp 2020.2, API 8.2
1644
- @param[in,out] model The model object.
1645
- @param[out] count The number of layers deleted. If NULL, count
1646
- will not be retrieved.
1647
- @related SUModelRef
1648
- @return
1649
- - \ref SU_ERROR_NONE on success
1650
- - \ref SU_ERROR_INVALID_INPUT if \p model is an invalid object
1651
- */
1652
- SU_RESULT SUModelPurgeUnusedLayers(SUModelRef model, size_t* count);
1653
-
1654
- /**
1655
- @brief Retrieves the number of layers in a model object that have not been
1656
- added to any layer folder.
1657
- @since SketchUp 2021.0, API 9.0
1658
- @param[in] model The model object.
1659
- @param[out] count The number of top-level layers available.
1660
- @related SUModelRef
1661
- @see SUModelGetNumLayers()
1662
- @return
1663
- - \ref SU_ERROR_NONE on success
1664
- - \ref SU_ERROR_INVALID_INPUT if \p model is not a valid object
1665
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p count is NULL
1666
- */
1667
- SU_RESULT SUModelGetNumTopLevelLayers(SUModelRef model, size_t* count);
1668
-
1669
- /**
1670
- @brief Retrieves the layers in a model that have not been added to a
1671
- layer folder.
1672
- @since SketchUp 2021.0, API 9.0
1673
- @param[in] model The model object.
1674
- @param[in] len The number of layers to retrieve.
1675
- @param[out] layers The layers retrieved.
1676
- @param[out] count The number of layers retrieved.
1677
- @related SUModelRef
1678
- @see SUModelGetLayers()
1679
- @return
1680
- - \ref SU_ERROR_NONE on success
1681
- - \ref SU_ERROR_INVALID_INPUT if \p model is not a valid object
1682
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p layers or \p count is NULL
1683
- */
1684
- SU_RESULT SUModelGetTopLevelLayers(
1685
- SUModelRef model, size_t len, SULayerRef layers[], size_t* count);
1686
-
1687
- /**
1688
- @brief Removes all layer folders provided in the array. All children of the
1689
- deleted layer folders will be moved to the parent of the deleted folder.
1690
- @since SketchUp 2021.0, API 9.0
1691
- @param[in,out] model The model object.
1692
- @param[in] len The length of the array.
1693
- @param[in] layer_folders The layer folders to be deleted.
1694
- @related SUModelRef
1695
- @return
1696
- - \ref SU_ERROR_NONE on success
1697
- - \ref SU_ERROR_INVALID_INPUT if \p model is not a valid object.
1698
- - \ref SU_ERROR_NULL_POINTER_INPUT if \p layer_folders is NULL
1699
- - \ref SU_ERROR_OUT_OF_RANGE if \p len is less than one.
1700
- - \ref SU_ERROR_INVALID_ARGUMENT if the number of successfully removed items
1701
- in \p layer_folders is 0.
1702
- - \ref SU_ERROR_PARTIAL_SUCCESS if we successfully remove at least 1 of the
1703
- items provided in \p layer_folders but fail to remove others.
1704
- */
1705
- SU_RESULT SUModelRemoveLayerFolders(SUModelRef model, size_t len, SULayerFolderRef layer_folders[]);
1706
-
1707
- /**
1708
- * @anchor SUModelGetEntitiesType
1709
- * @since SketchUp 2020.2, API 8.2
1710
- * @name Entity Type Flags
1711
- * @brief Flags for SUModelGetEntitiesOfTypeByPersistentIDs(). These can be
1712
- * combined bitwise.
1713
- * @see SUModelRef
1714
- * @{
1715
- */
1716
- /// Any entities inside the root or another definition's entities.
1717
- #define FLAG_GET_ENTITIES_TYPE_DEFINITION_ENTITIES 0x0001
1718
- /// SULayerRef entities.
1719
- #define FLAG_GET_ENTITIES_TYPE_LAYERS 0x0002
1720
- /// SULayerFolderRef entities.
1721
- #define FLAG_GET_ENTITIES_TYPE_LAYER_FOLDERS 0x0004
1722
- /// SUMaterialRef entities.
1723
- #define FLAG_GET_ENTITIES_TYPE_MATERIALS 0x0008
1724
- /// SUSceneRef entities.
1725
- #define FLAG_GET_ENTITIES_TYPE_SCENES 0x0010
1726
- /// SUStyleRef entities.
1727
- #define FLAG_GET_ENTITIES_TYPE_STYLES 0x0020
1728
- /// SUComponentDefinitionRef entities.
1729
- #define FLAG_GET_ENTITIES_TYPE_DEFINITIONS 0x0040
1730
- /// Search all types.
1731
- #define FLAG_GET_ENTITIES_TYPE_ALL 0xffff
1732
- /**@}*/
1733
-
1734
- /**
1735
- @brief Retrieves entities of a given type by their persistent ids. The
1736
- entities retrieved will be in the same order as to the peristent ids passed
1737
- in. If a persistent id doesn't belong to an entity, then a \ref SU_INVALID
1738
- element will be returned along with \ref SU_ERROR_PARTIAL_SUCCESS.
1739
- @note This method allows the user to search for specific types of entities
1740
- which allows us to ignore parts of the model for faster results.
1741
- @since SketchUp 2020.2, API 8.2
1742
- @param[in] model The model object.
1743
- @param[in] type_flags An integer made up by combining \ref SUModelGetEntitiesType
1744
- "Entity Type Flag" values together with bitwise 'or'. This
1745
- determines what types of entities to look for.
1746
- @param[in] num_pids The number of persistent ids.
1747
- @param[in] pids The persistent ids.
1748
- @param[out] entities The retrieved entity objects.
1749
- @related SUModelRef
1750
- @return
1751
- - \ref SU_ERROR_NONE on success or if num_pids is zero
1752
- - \ref SU_ERROR_INVALID_INPUT if model is an invalid object
1753
- - \ref SU_ERROR_NULL_POINTER_INPUT if pids is NULL
1754
- - \ref SU_ERROR_NULL_POINTER_OUTPUT if entities is NULL
1755
- - \ref SU_ERROR_PARTIAL_SUCCESS if one or more entities could not be found
1756
- - \ref SU_ERROR_OVERWRITE_VALID if entities contains a valid \ref SUEntityRef
1757
- */
1758
- SU_RESULT SUModelGetEntitiesOfTypeByPersistentIDs(
1759
- SUModelRef model, const uint32_t type_flags, const size_t num_pids, const int64_t pids[],
1760
- SUEntityRef entities[]);
1761
-
1762
- /**
1763
- @brief Retrieves the component behavior of a SketchUp model.
1764
- @since SketchUp 2021.1, API 9.1
1765
- @param[in] model The model object.
1766
- @param[out] behavior The behavior retrieved.
1767
- @related SUModelRef
1768
- @return
1769
- - \ref SU_ERROR_NONE on success
1770
- - \ref SU_ERROR_INVALID_INPUT if \p behavior is invalid
1771
- */
1772
- SU_RESULT SUModelGetBehavior(SUModelRef model, struct SUComponentBehavior* behavior);
1773
-
1774
- /**
1775
- @brief Sets the component behavior of a SketchUp model.
1776
- @since SketchUp 2021.1, API 9.1
1777
- @param[in,out] model The model object.
1778
- @param[in] behavior The behavior to set.
1779
- @related SUModelRef
1780
- @return
1781
- - \ref SU_ERROR_NONE on success
1782
- - \ref SU_ERROR_INVALID_INPUT if \p model is invalid
1783
- - \ref SU_ERROR_NULL_POINTER_INPUT if \p behavior is NULL
1784
- */
1785
- SU_RESULT SUModelSetBehavior(SUModelRef model, const struct SUComponentBehavior* behavior);
1786
-
1787
- /**
1788
- * @brief Retrieves the number of active section planes in the model.
1789
- * @since SketchUp 2025.1, API 13.1
1790
- * @param[in] model The model object.
1791
- * @param[out] count The number of active section planes.
1792
- * @related SUModelRef
1793
- * @return
1794
- * - \ref SU_ERROR_NONE on success
1795
- * - \ref SU_ERROR_INVALID_INPUT if \p model is not a valid object
1796
- * - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p count is `NULL`
1797
- */
1798
- SU_RESULT SUModelGetNumActiveSectionPlanes(SUModelRef model, size_t* count);
1799
-
1800
- /**
1801
- * @brief Retrieves the active section planes in the model.
1802
- * @since SketchUp 2025.1, API 13.1
1803
- * @param[in] model The model object.
1804
- * @param[in] len The number of active section planes to retrieve.
1805
- * @param[out] active_section_planes The active section planes retrieved.
1806
- * @param[out] count The number of active section planes retrieved.
1807
- * @related SUModelRef
1808
- * @return
1809
- * - \ref SU_ERROR_NONE on success
1810
- * - \ref SU_ERROR_INVALID_INPUT if \p model is not a valid object
1811
- * - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p active_section_planes or \p count is `NULL`
1812
- */
1813
- SU_RESULT SUModelGetActiveSectionPlanes(
1814
- SUModelRef model, size_t len, SUSectionPlaneRef active_section_planes[], size_t* count);
1815
-
1816
- #ifdef __cplusplus
1817
- }
1818
- #endif
1819
-
1820
- #if defined(__APPLE__)
1821
- #pragma GCC diagnostic pop
1822
- #endif
1823
-
1824
- #pragma pack(pop)
1825
-
1826
- #endif // SKETCHUP_MODEL_MODEL_H_