scriptup 2024.0.7 → 2026.0.1

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 (158) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/ext/attribute_dictionaries.h +6 -1
  4. data/ext/attribute_dictionary.c +1 -0
  5. data/ext/attribute_dictionary.h +6 -1
  6. data/ext/behavior.h +6 -1
  7. data/ext/color.h +6 -1
  8. data/ext/component_definition.h +6 -1
  9. data/ext/component_instance.h +6 -1
  10. data/ext/definition_list.h +6 -1
  11. data/ext/drawing_element.c +135 -0
  12. data/ext/drawing_element.h +6 -1
  13. data/ext/entities.c +13 -0
  14. data/ext/entities.h +6 -1
  15. data/ext/entity.c +3 -0
  16. data/ext/entity.h +6 -1
  17. data/ext/material.h +6 -1
  18. data/ext/materials.h +6 -1
  19. data/ext/model.h +6 -1
  20. data/ext/not_implemented.c +88 -0
  21. data/ext/not_implemented.h +20 -0
  22. data/ext/sketchup.c +15 -0
  23. data/ext/sketchup.h +6 -1
  24. data/ext/texture.c +99 -0
  25. data/ext/texture.h +6 -1
  26. data/ext/typed_value.h +6 -0
  27. data/ext/utils.h +34 -3
  28. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Frameworks/libCommonGeometry.dylib +0 -0
  29. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/{Libraries → Frameworks}/libCommonGeoutils.dylib +0 -0
  30. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/{Libraries → Frameworks}/libCommonImage.dylib +0 -0
  31. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Frameworks/libCommonPreferences.dylib +0 -0
  32. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Frameworks/libCommonUnits.dylib +0 -0
  33. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Frameworks/libCommonUtils.dylib +0 -0
  34. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Frameworks/libCommonZip.dylib +0 -0
  35. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/model.h +4 -4
  36. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/overlay.h +20 -6
  37. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/common.h +9 -9
  38. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/extension_license.h +9 -1
  39. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point2d.h +2 -2
  40. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point3d.h +2 -2
  41. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/transformation2d.h +3 -3
  42. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector2d.h +5 -5
  43. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector3d.h +4 -4
  44. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry.h +9 -7
  45. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/modelimporterplugin.h +8 -4
  46. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/attribute_dictionary.h +4 -4
  47. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_definition.h +74 -33
  48. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_definition_snap_to_behavior_private.h +46 -0
  49. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_instance.h +11 -11
  50. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/curve.h +4 -4
  51. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/defs.h +7 -2
  52. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension.h +2 -0
  53. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/drawing_element.h +11 -11
  54. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/edge.h +7 -7
  55. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entities.h +106 -61
  56. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity.h +7 -4
  57. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/environment.h +382 -0
  58. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/environments.h +133 -0
  59. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/face.h +43 -27
  60. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/geometry_input.h +126 -116
  61. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/group.h +9 -8
  62. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/image.h +6 -5
  63. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/layer.h +3 -3
  64. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/material.h +432 -25
  65. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model.h +263 -100
  66. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model_entity_type_private.h +44 -0
  67. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/rendering_options.h +82 -81
  68. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/scene.h +222 -42
  69. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/snap.h +183 -0
  70. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/space.h +26 -0
  71. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/styles.h +29 -27
  72. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/text.h +14 -6
  73. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/texture.h +23 -1
  74. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/typed_value.h +26 -26
  75. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/vertex.h +2 -2
  76. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/sketchup.h +4 -1
  77. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/unicodestring.h +7 -7
  78. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Resources/Info.plist +8 -8
  79. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/SketchUpAPI +0 -0
  80. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/_CodeSignature/CodeResources +144 -88
  81. data/sketchup-sdk-win/binaries/layout/x64/LayOutAPI.dll +0 -0
  82. data/sketchup-sdk-win/binaries/layout/x64/LayOutAPI.lib +0 -0
  83. data/sketchup-sdk-win/binaries/layout/x64/LayOutControllers.dll +0 -0
  84. data/sketchup-sdk-win/binaries/layout/x64/LayOutModel.dll +0 -0
  85. data/sketchup-sdk-win/binaries/layout/x64/LayOutRTF.dll +0 -0
  86. data/sketchup-sdk-win/binaries/layout/x64/LayOutUtils.dll +0 -0
  87. data/sketchup-sdk-win/binaries/layout/x64/LayOutView.dll +0 -0
  88. data/sketchup-sdk-win/binaries/layout/x64/SketchUpCommonPreferences.dll +0 -0
  89. data/sketchup-sdk-win/binaries/layout/x64/SketchUpViewerAPI.dll +0 -0
  90. data/sketchup-sdk-win/binaries/layout/x64/SketchUpViewerAPI.lib +0 -0
  91. data/sketchup-sdk-win/binaries/layout/x64/pdflib.dll +0 -0
  92. data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpAPI.dll +0 -0
  93. data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpAPI.lib +0 -0
  94. data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpCommonPreferences.dll +0 -0
  95. data/sketchup-sdk-win/binaries/sketchup/x64/sketchup.lib +0 -0
  96. data/sketchup-sdk-win/headers/LayOutAPI/application/application.h +14 -14
  97. data/sketchup-sdk-win/headers/LayOutAPI/layout.h +1 -1
  98. data/sketchup-sdk-win/headers/LayOutAPI/model/dictionary.h +1 -1
  99. data/sketchup-sdk-win/headers/LayOutAPI/model/document.h +73 -0
  100. data/sketchup-sdk-win/headers/LayOutAPI/model/documentexportoptions.h +21 -2
  101. data/sketchup-sdk-win/headers/LayOutAPI/model/entity.h +72 -0
  102. data/sketchup-sdk-win/headers/LayOutAPI/model/group.h +2 -1
  103. data/sketchup-sdk-win/headers/LayOutAPI/model/lineardimension.h +54 -2
  104. data/sketchup-sdk-win/headers/LayOutAPI/model/page.h +70 -0
  105. data/sketchup-sdk-win/headers/LayOutAPI/model/sketchupmodel.h +58 -1
  106. data/sketchup-sdk-win/headers/LayOutAPI/model/style.h +39 -3
  107. data/sketchup-sdk-win/headers/LayOutAPI/model/table.h +2 -0
  108. data/sketchup-sdk-win/headers/LayOutAPI/model/typed_value.h +25 -1
  109. data/sketchup-sdk-win/headers/SketchUpAPI/application/model.h +4 -4
  110. data/sketchup-sdk-win/headers/SketchUpAPI/application/overlay.h +20 -6
  111. data/sketchup-sdk-win/headers/SketchUpAPI/common.h +9 -9
  112. data/sketchup-sdk-win/headers/SketchUpAPI/extension_license.h +9 -1
  113. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point2d.h +2 -2
  114. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point3d.h +2 -2
  115. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/transformation2d.h +3 -3
  116. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector2d.h +5 -5
  117. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector3d.h +4 -4
  118. data/sketchup-sdk-win/headers/SketchUpAPI/geometry.h +9 -7
  119. data/sketchup-sdk-win/headers/SketchUpAPI/import_export/modelimporterplugin.h +8 -4
  120. data/sketchup-sdk-win/headers/SketchUpAPI/model/attribute_dictionary.h +4 -4
  121. data/sketchup-sdk-win/headers/SketchUpAPI/model/component_definition.h +74 -33
  122. data/sketchup-sdk-win/headers/SketchUpAPI/model/component_definition_snap_to_behavior_private.h +46 -0
  123. data/sketchup-sdk-win/headers/SketchUpAPI/model/component_instance.h +11 -11
  124. data/sketchup-sdk-win/headers/SketchUpAPI/model/curve.h +4 -4
  125. data/sketchup-sdk-win/headers/SketchUpAPI/model/defs.h +7 -2
  126. data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension.h +2 -0
  127. data/sketchup-sdk-win/headers/SketchUpAPI/model/drawing_element.h +11 -11
  128. data/sketchup-sdk-win/headers/SketchUpAPI/model/edge.h +7 -7
  129. data/sketchup-sdk-win/headers/SketchUpAPI/model/entities.h +106 -61
  130. data/sketchup-sdk-win/headers/SketchUpAPI/model/entity.h +7 -4
  131. data/sketchup-sdk-win/headers/SketchUpAPI/model/environment.h +382 -0
  132. data/sketchup-sdk-win/headers/SketchUpAPI/model/environments.h +133 -0
  133. data/sketchup-sdk-win/headers/SketchUpAPI/model/face.h +43 -27
  134. data/sketchup-sdk-win/headers/SketchUpAPI/model/geometry_input.h +126 -116
  135. data/sketchup-sdk-win/headers/SketchUpAPI/model/group.h +9 -8
  136. data/sketchup-sdk-win/headers/SketchUpAPI/model/image.h +6 -5
  137. data/sketchup-sdk-win/headers/SketchUpAPI/model/layer.h +3 -3
  138. data/sketchup-sdk-win/headers/SketchUpAPI/model/material.h +432 -25
  139. data/sketchup-sdk-win/headers/SketchUpAPI/model/model.h +263 -100
  140. data/sketchup-sdk-win/headers/SketchUpAPI/model/model_entity_type_private.h +44 -0
  141. data/sketchup-sdk-win/headers/SketchUpAPI/model/rendering_options.h +82 -81
  142. data/sketchup-sdk-win/headers/SketchUpAPI/model/scene.h +222 -42
  143. data/sketchup-sdk-win/headers/SketchUpAPI/model/snap.h +183 -0
  144. data/sketchup-sdk-win/headers/SketchUpAPI/model/space.h +26 -0
  145. data/sketchup-sdk-win/headers/SketchUpAPI/model/styles.h +29 -27
  146. data/sketchup-sdk-win/headers/SketchUpAPI/model/text.h +14 -6
  147. data/sketchup-sdk-win/headers/SketchUpAPI/model/texture.h +23 -1
  148. data/sketchup-sdk-win/headers/SketchUpAPI/model/typed_value.h +26 -26
  149. data/sketchup-sdk-win/headers/SketchUpAPI/model/vertex.h +2 -2
  150. data/sketchup-sdk-win/headers/SketchUpAPI/sketchup.h +4 -1
  151. data/sketchup-sdk-win/headers/SketchUpAPI/unicodestring.h +7 -7
  152. metadata +27 -13
  153. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonGeometry.dylib +0 -0
  154. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonPreferences.dylib +0 -0
  155. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonUnits.dylib +0 -0
  156. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonUtils.dylib +0 -0
  157. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonZip.dylib +0 -0
  158. data/sketchup-sdk-win/headers/LayOutAPI/model/skpfilereference.h +0 -94
@@ -1,4 +1,4 @@
1
- // Copyright 2013-2020 Trimble Inc. All Rights Reserved.
1
+ // Copyright 2013-2024 Trimble Inc. All Rights Reserved.
2
2
 
3
3
  /**
4
4
  * @file
@@ -34,24 +34,30 @@ extern "C" {
34
34
  @brief References a component definition.
35
35
  */
36
36
 
37
+ // The SUSnapToBehavior enum was originally defined incorrectly in this struct.
38
+ // This is not valid C. To correct this we conditionally include it in here for
39
+ // C compilers, while leaving the original definition inside the struct for C++
40
+ // compilers.
41
+ #ifndef __cplusplus
42
+ #include <SketchUpAPI/model/component_definition_snap_to_behavior_private.h>
43
+ #endif
44
+
37
45
  /**
38
46
  @struct SUComponentBehavior
39
47
  @brief Describes how the component behaves in a SketchUp model, e.g. how it glues to surfaces.
48
+
49
+ @note See \ref SUSnapToBehavior for examples on how it is defined depending on
50
+ whether the code is compiled as C or C++. (Related to a bug in the original implementation).
51
+
52
+ @see SUSnapToBehavior
53
+ @see SUComponentDefinitionGetBehavior
54
+ @see SUComponentDefinitionSetBehavior
40
55
  */
41
56
  struct SUComponentBehavior {
42
- /**
43
- @enum SUSnapToBehavior
44
- @brief Describes how the component instance can be placed when a user adds
45
- it to a model. For example a window component instance should snap
46
- to a vertical plane.
47
- */
48
- enum SUSnapToBehavior {
49
- SUSnapToBehavior_None = 0,
50
- SUSnapToBehavior_Any,
51
- SUSnapToBehavior_Horizontal,
52
- SUSnapToBehavior_Vertical,
53
- SUSnapToBehavior_Sloped
54
- };
57
+ #ifdef __cplusplus
58
+ // See the note above for why this is included here.
59
+ #include <SketchUpAPI/model/component_definition_snap_to_behavior_private.h>
60
+ #endif
55
61
 
56
62
  /**
57
63
  How the component should snap to the surface where it's placed.
@@ -167,7 +173,7 @@ SU_RESULT SUComponentDefinitionCreate(SUComponentDefinitionRef* comp_def);
167
173
  the provided definition was contained by a model, use
168
174
  SUModelRemoveComponentDefinitions() to remove the definition and all
169
175
  instances.
170
- @param[in] comp_def The component definition object.
176
+ @param[in,out] comp_def The component definition object.
171
177
  @related SUComponentDefinitionRef
172
178
  @return
173
179
  - \ref SU_ERROR_NONE on success
@@ -196,10 +202,10 @@ SU_RESULT SUComponentDefinitionGetName(SUComponentDefinitionRef comp_def, SUStri
196
202
  @bug Before SketchUp 2022.0.1 (API 10.0) this would not ensure the definition name was unique.
197
203
  As of SketchUp 2022.0.1 the component will be given a unique name automatically if needed.
198
204
 
199
- @param[in] comp_def The component definition object.
200
- @param[in] name The name of the component definition. Assumed to be UTF-8
201
- encoded. If the requested name already belongs to another definition in the model,
202
- a unique name will be generated based on this name.
205
+ @param[in,out] comp_def The component definition object.
206
+ @param[in] name The name of the component definition. Assumed to be UTF-8
207
+ encoded. If the requested name already belongs to another definition in the
208
+ model, a unique name will be generated based on this name.
203
209
  @related SUComponentDefinitionRef
204
210
  @return
205
211
  - \ref SU_ERROR_NONE on success
@@ -231,8 +237,8 @@ SU_RESULT SUComponentDefinitionGetGuid(SUComponentDefinitionRef comp_def, SUStri
231
237
 
232
238
  /**
233
239
  @brief Retrieves the entities of the component definition.
234
- @param[in] comp_def The component definition object.
235
- @param[out] entities The entities retrieved.
240
+ @param[in,out] comp_def The component definition object.
241
+ @param[out] entities The entities retrieved.
236
242
  @related SUComponentDefinitionRef
237
243
  @return
238
244
  - \ref SU_ERROR_NONE on success
@@ -258,8 +264,8 @@ SU_RESULT SUComponentDefinitionGetDescription(SUComponentDefinitionRef comp_def,
258
264
 
259
265
  /**
260
266
  @brief Sets the description of the component definition.
261
- @param[in] comp_def The component definition object.
262
- @param[in] desc The description to be set. Assumed to be UTF-8 encoded.
267
+ @param[in,out] comp_def The component definition object.
268
+ @param[in] desc The description to be set. Assumed to be UTF-8 encoded.
263
269
  @related SUComponentDefinitionRef
264
270
  @return
265
271
  - \ref SU_ERROR_NONE on success
@@ -347,34 +353,52 @@ SU_RESULT SUComponentDefinitionGetInstances(
347
353
 
348
354
  /**
349
355
  @brief Retrieves the behavior of a component definition.
356
+
357
+ @note See \ref SUSnapToBehavior for examples on how it is defined depending on
358
+ whether the code is compiled as C or C++. (Related to a bug in the original implementation).
359
+
350
360
  @param[in] comp_def The component definition object.
351
361
  @param[out] behavior The behavior retrieved.
352
362
  @related SUComponentDefinitionRef
353
363
  @return
354
364
  - \ref SU_ERROR_NONE on success
355
365
  - \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
366
+
367
+ @see SUSnapToBehavior
368
+ @see SUComponentBehavior
369
+ @see SUComponentDefinitionGetBehavior
370
+ @see SUComponentDefinitionSetBehavior
356
371
  */
357
372
  SU_RESULT SUComponentDefinitionGetBehavior(
358
373
  SUComponentDefinitionRef comp_def, struct SUComponentBehavior* behavior);
359
374
 
360
375
  /**
361
376
  @brief Sets the component behavior of a component definition.
362
- @param[in] comp_def The component definition object.
363
- @param[in] behavior The behavior to set.
377
+
378
+ @note See \ref SUSnapToBehavior for examples on how it is defined depending on
379
+ whether the code is compiled as C or C++. (Related to a bug in the original implementation).
380
+
381
+ @param[in,out] comp_def The component definition object.
382
+ @param[in] behavior The behavior to set.
364
383
  @related SUComponentDefinitionRef
365
384
  @return
366
385
  - \ref SU_ERROR_NONE on success
367
386
  - \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
368
387
  - \ref SU_ERROR_NULL_POINTER_INPUT if behavior is NULL
388
+
389
+ @see SUSnapToBehavior
390
+ @see SUComponentBehavior
391
+ @see SUComponentDefinitionGetBehavior
392
+ @see SUComponentDefinitionSetBehavior
369
393
  */
370
394
  SU_RESULT SUComponentDefinitionSetBehavior(
371
395
  SUComponentDefinitionRef comp_def, const struct SUComponentBehavior* behavior);
372
396
 
373
397
  /**
374
398
  @brief Applies a schema type from a schema to a component definition.
375
- @param[in] comp_def The component definition object.
376
- @param[in] schema_ref The schema that owns the schema type to apply.
377
- @param[in] schema_type_ref The schema type to apply.
399
+ @param[in,out] comp_def The component definition object.
400
+ @param[in] schema_ref The schema that owns the schema type to apply.
401
+ @param[in] schema_type_ref The schema type to apply.
378
402
  @related SUComponentDefinitionRef
379
403
  @return
380
404
  - \ref SU_ERROR_NONE on success
@@ -463,6 +487,10 @@ SU_RESULT SUComponentDefinitionGetOpenings(
463
487
  /**
464
488
  @brief Retrieves the insertion point from the component definition.
465
489
  @since SketchUp 2016, API 4.0
490
+
491
+ @deprecated Starting with SketchUp 2020.0, this function returns the default origin `[0, 0, 0]`, as
492
+ the insertion point can no longer be changed.
493
+
466
494
  @param[in] comp_def The component definition object.
467
495
  @param[out] point The insertion point retrieved.
468
496
  @related SUComponentDefinitionRef
@@ -493,7 +521,7 @@ SU_RESULT SUComponentDefinitionGetType(
493
521
  @brief Updates the faces in the component definition so that they are oriented
494
522
  consistently.
495
523
  @since SketchUp 2016, API 4.0
496
- @param[in] comp_def The component definition object.
524
+ @param[in,out] comp_def The component definition object.
497
525
  @related SUComponentDefinitionRef
498
526
  @return
499
527
  - \ref SU_ERROR_NONE on success
@@ -514,8 +542,8 @@ SU_RESULT SUComponentDefinitionOrientFacesConsistently(SUComponentDefinitionRef
514
542
  was changed to \ref SU_ERROR_NULL_POINTER_INPUT for consistency with
515
543
  other API methods.
516
544
 
517
- @param[in] comp_def The component definition object.
518
- @param[in] point The \ref SUPoint3D to use.
545
+ @param[in,out] comp_def The component definition object.
546
+ @param[in] point The \ref SUPoint3D to use.
519
547
  @related SUComponentDefinitionRef
520
548
  @return
521
549
  - \ref SU_ERROR_NONE
@@ -527,8 +555,8 @@ SU_RESULT SUComponentDefinitionSetInsertPoint(
527
555
  /**
528
556
  @brief Sets the axes of the component definition.
529
557
  @since SketchUp 2016, API 4.0
530
- @param[in] comp_def The component definition object.
531
- @param[in] axes The \ref SUAxesRef to use.
558
+ @param[in,out] comp_def The component definition object.
559
+ @param[in] axes The \ref SUAxesRef to use.
532
560
  @related SUComponentDefinitionRef
533
561
  @return
534
562
  - \ref SU_ERROR_NONE on success
@@ -575,6 +603,19 @@ SU_RESULT SUComponentDefinitionIsLiveComponent(SUComponentDefinitionRef comp_def
575
603
  SU_RESULT SUComponentDefinitionSaveToFile(
576
604
  SUComponentDefinitionRef comp_def, const char* file_path, enum SUModelVersion version);
577
605
 
606
+ /**
607
+ * @brief Retrieves the flag indicating whether the component definition is manifold.
608
+ * @since SketchUp 2025.0, API 13.0
609
+ * @param[in] comp_def The component definition object.
610
+ * @param[out] is_manifold The bool value retrieved.
611
+ * @related SUComponentDefinitionRef
612
+ * @return
613
+ * - \ref SU_ERROR_NONE on success
614
+ * - \ref SU_ERROR_INVALID_INPUT if \p comp_def is invalid
615
+ * - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p is_manifold is NULL
616
+ */
617
+ SU_RESULT SUComponentDefinitionIsManifold(SUComponentDefinitionRef comp_def, bool* is_manifold);
618
+
578
619
  #ifdef __cplusplus
579
620
  } // extern "C"
580
621
  #endif
@@ -0,0 +1,46 @@
1
+ /**
2
+ * @file
3
+ * @brief Definition for \ref SUSnapToBehavior. Don't include directly.
4
+ *
5
+ * @warning Do not include this header directly. This file is part of a
6
+ * compatibility shim. Instead include `SketchUpAPI/model/component_definition.h`.
7
+ */
8
+
9
+ /**
10
+ @enum SUSnapToBehavior
11
+ @headerfile <SketchUpAPI/model/component_definition.h>
12
+ @brief Describes how the component instance can be placed when a user adds it to a model.
13
+
14
+ For example a window component instance should snap to a vertical plane.
15
+
16
+ @see SUComponentBehavior
17
+
18
+ @bug This enum was incorrectly defined inside the \ref SUComponentBehavior struct. This is
19
+ not valid C. As of SketchUp 2025.0 (API 13.0), this enum is conditionally defined outside
20
+ of the struct when the header is consumed by a C compiler.
21
+
22
+ @code
23
+ // Usage from a C compiler:
24
+ SUSnapToBehavior behavior;
25
+ SUComponentDefinitionSetBehavior(component_definition, &behavior);
26
+ if (behavior.component_snap == SUSnapToBehavior_Vertical) {
27
+ // ...
28
+ }
29
+ @endcode
30
+
31
+ @code
32
+ // Usage from a C++ compiler:
33
+ SUSnapToBehavior behavior;
34
+ SUComponentDefinitionSetBehavior(component_definition, &behavior);
35
+ if (behavior.component_snap == SUComponentBehavior::SUSnapToBehavior_Vertical) {
36
+ // ...
37
+ }
38
+ @endcode
39
+ */
40
+ enum SUSnapToBehavior {
41
+ SUSnapToBehavior_None = 0,
42
+ SUSnapToBehavior_Any,
43
+ SUSnapToBehavior_Horizontal,
44
+ SUSnapToBehavior_Vertical,
45
+ SUSnapToBehavior_Sloped
46
+ };
@@ -72,9 +72,9 @@ SUComponentInstanceFromDrawingElement(SUDrawingElementRef drawing_elem);
72
72
 
73
73
  /**
74
74
  @brief Sets the name of a component instance object.
75
- @param[in] instance The component instance object.
76
- @param[in] name The name string to set the component instance object.
77
- Assumed to be UTF-8 encoded.
75
+ @param[in,out] instance The component instance object.
76
+ @param[in] name The name string to set the component instance object.
77
+ Assumed to be UTF-8 encoded.
78
78
  @related SUComponentInstanceRef
79
79
  @return
80
80
  - \ref SU_ERROR_NONE on success
@@ -86,7 +86,7 @@ SU_RESULT SUComponentInstanceSetName(SUComponentInstanceRef instance, const char
86
86
  /**
87
87
  @brief Deallocates a component instance object created with
88
88
  SUComponentDefinitionCreateInstance().
89
- @param[in] instance The component instance object.
89
+ @param[in,out] instance The component instance object.
90
90
  @related SUComponentInstanceRef
91
91
  @return
92
92
  - \ref SU_ERROR_NONE on success
@@ -111,8 +111,8 @@ SU_RESULT SUComponentInstanceGetName(SUComponentInstanceRef instance, SUStringRe
111
111
  /**
112
112
  @brief Sets the globally unique identifier (guid) string of a instance object.
113
113
  @since SketchUp 2015, API 3.0
114
- @param[in] instance The component instance object.
115
- @param[in] guid The utf-8 formatted guid string.
114
+ @param[in,out] instance The component instance object.
115
+ @param[in] guid The utf-8 formatted guid string.
116
116
  @related SUComponentInstanceRef
117
117
  @return
118
118
  - \ref SU_ERROR_NONE on success
@@ -141,12 +141,12 @@ SU_RESULT SUComponentInstanceGetGuid(SUComponentInstanceRef instance, SUStringRe
141
141
  The transform is relative to the parent component. If the parent component is
142
142
  the root component of a model, then the transform is relative to absolute
143
143
  coordinates.
144
- @param[in] instance The component instance object.
145
- @param[in] transform The affine transform to set.
144
+ @param[in,out] instance The component instance object.
145
+ @param[in] transform The affine transform to set.
146
146
  @related SUComponentInstanceRef
147
147
  @return
148
148
  - \ref SU_ERROR_NONE on success
149
- - \ref SU_ERROR_INVALID_INPUT if instance is not a valid object
149
+ - \ref SU_ERROR_INVALID_INPUT if instance is not a valid object or transform is non invertible
150
150
  - \ref SU_ERROR_NULL_POINTER_INPUT if transform is NULL
151
151
  */
152
152
  SU_RESULT SUComponentInstanceSetTransform(
@@ -184,8 +184,8 @@ SU_RESULT SUComponentInstanceGetDefinition(
184
184
  /**
185
185
  @brief Locks the instance if is_locked is true, otherwise unlocks the instance.
186
186
  @since SketchUp 2016, API 4.0
187
- @param[in] instance The instance object.
188
- @param[in] lock if true lock the instance, otherwise unlock it.
187
+ @param[in,out] instance The instance object.
188
+ @param[in] lock if true lock the instance, otherwise unlock it.
189
189
  @related SUComponentInstanceRef
190
190
  @return
191
191
  - \ref SU_ERROR_NONE on success
@@ -56,9 +56,9 @@ SU_EXPORT SUCurveRef SUCurveFromEntity(SUEntityRef entity);
56
56
  same as the end position of the previous edge in the array. Each
57
57
  element of the array of edges is subsequently associated with the
58
58
  created curve object and must not be deallocated via SUEdgeRelease().
59
- @param curve The curve object created.
60
- @param edges The array of edge objects.
61
- @param len The number of edge objects in the array.
59
+ @param[out] curve The curve object created.
60
+ @param[in] edges The array of edge objects.
61
+ @param[in] len The number of edge objects in the array.
62
62
  @related SUCurveRef
63
63
  @return
64
64
  - \ref SU_ERROR_NONE on success
@@ -74,7 +74,7 @@ SU_RESULT SUCurveCreateWithEdges(SUCurveRef* curve, const SUEdgeRef edges[], siz
74
74
 
75
75
  /**
76
76
  @brief Releases a curve object and its associated edge objects.
77
- @param curve The curve object.
77
+ @param[in,out] curve The curve object.
78
78
  @related SUCurveRef
79
79
  @return
80
80
  - \ref SU_ERROR_NONE on success
@@ -1,4 +1,4 @@
1
- // Copyright 2013-2020 Trimble Inc. All Rights Reserved.
1
+ // Copyright 2012-2024 Trimble Inc. All Rights Reserved.
2
2
 
3
3
  /**
4
4
  * @file
@@ -34,6 +34,8 @@ DEFINE_SU_TYPE(SUEntitiesRef)
34
34
  DEFINE_SU_TYPE(SUEntityListRef)
35
35
  DEFINE_SU_TYPE(SUEntityListIteratorRef)
36
36
  DEFINE_SU_TYPE(SUEntityRef)
37
+ DEFINE_SU_TYPE(SUEnvironmentRef)
38
+ DEFINE_SU_TYPE(SUEnvironmentsRef)
37
39
  DEFINE_SU_TYPE(SUFaceRef)
38
40
  DEFINE_SU_TYPE(SUFontRef)
39
41
  DEFINE_SU_TYPE(SUGeometryInputRef)
@@ -65,6 +67,7 @@ DEFINE_SU_TYPE(SUSchemaTypeRef)
65
67
  DEFINE_SU_TYPE(SUSectionPlaneRef)
66
68
  DEFINE_SU_TYPE(SUSelectionRef)
67
69
  DEFINE_SU_TYPE(SUShadowInfoRef)
70
+ DEFINE_SU_TYPE(SUSnapRef)
68
71
  DEFINE_SU_TYPE(SUStyleRef)
69
72
  DEFINE_SU_TYPE(SUStylesRef)
70
73
  DEFINE_SU_TYPE(SUTextRef)
@@ -87,6 +90,8 @@ enum SURefType {
87
90
  SURefType_Curve, ///< SUCurveRef type
88
91
  SURefType_Edge, ///< SUEdgeRef type
89
92
  SURefType_EdgeUse, ///< SUEdgeUseRef type
93
+ SURefType_Environment, ///< SUEnvironment type
94
+ SURefType_Environments, ///< SUEnvironments type
90
95
  SURefType_Entities, ///< SUEntitiesRef type
91
96
  SURefType_Face, ///< SUFaceRef type
92
97
  SURefType_Group, ///< SUGroupRef type
@@ -134,7 +139,7 @@ enum SURefType {
134
139
  SURefType_LineStyleManager, ///< SULineStyleManagerRef type
135
140
  SURefType_Selection, ///< SUSelectionRef type
136
141
  SURefType_LayerFolder, ///< SULayerFolderRef type
137
-
142
+ SURefType_Snap, ///< SUSnapRef type
138
143
  };
139
144
 
140
145
  #pragma pack(pop)
@@ -191,6 +191,8 @@ SU_RESULT SUDimensionSetArrowType(SUDimensionRef dimension, enum SUArrowType typ
191
191
 
192
192
  /**
193
193
  @brief Get the dimension's font reference.
194
+ @note The returned font reference may become invalid if another font is
195
+ assigned to this dimension object later.
194
196
  @since SketchUp 2019, API 7.0
195
197
  @param[in] dimension The dimension object.
196
198
  @param[out] font The font retrieved.
@@ -88,9 +88,9 @@ SU_RESULT SUDrawingElementGetMaterial(SUDrawingElementRef elem, SUMaterialRef* m
88
88
 
89
89
  The material object must not be subsequently deallocated while associated with
90
90
  the drawing element.
91
- @param[in] elem The drawing element.
92
- @param[in] material The material object to set. If an invalid reference is
93
- given, then the material of the element will be removed.
91
+ @param[in,out] elem The drawing element.
92
+ @param[in] material The material object to set. If an invalid reference is
93
+ given, then the material of the element will be removed.
94
94
  @related SUDrawingElementRef
95
95
  @return
96
96
  - \ref SU_ERROR_NONE on success
@@ -113,8 +113,8 @@ SU_RESULT SUDrawingElementGetLayer(SUDrawingElementRef elem, SULayerRef* layer);
113
113
 
114
114
  /**
115
115
  @brief Sets the layer object to be associated with a drawing element.
116
- @param[in] elem The drawing element.
117
- @param[in] layer The layer object to set.
116
+ @param[in,out] elem The drawing element.
117
+ @param[in] layer The layer object to set.
118
118
  @related SUDrawingElementRef
119
119
  @return
120
120
  - \ref SU_ERROR_NONE on success
@@ -124,8 +124,8 @@ SU_RESULT SUDrawingElementSetLayer(SUDrawingElementRef elem, SULayerRef layer);
124
124
 
125
125
  /**
126
126
  @brief Sets the hide flag of a drawing element.
127
- @param[in] elem The drawing element.
128
- @param[in] hide_flag The hide flag to set.
127
+ @param[in,out] elem The drawing element.
128
+ @param[in] hide_flag The hide flag to set.
129
129
  @related SUDrawingElementRef
130
130
  @return
131
131
  - \ref SU_ERROR_NONE on success
@@ -147,8 +147,8 @@ SU_RESULT SUDrawingElementGetHidden(SUDrawingElementRef elem, bool* hide_flag);
147
147
 
148
148
  /**
149
149
  @brief Sets the casts shadows flag of a drawing element.
150
- @param[in] elem The drawing element.
151
- @param[in] casts_shadows_flag The casts shadows flag to set.
150
+ @param[in,out] elem The drawing element.
151
+ @param[in] casts_shadows_flag The casts shadows flag to set.
152
152
  @related SUDrawingElementRef
153
153
  @return
154
154
  - \ref SU_ERROR_NONE on success
@@ -170,8 +170,8 @@ SU_RESULT SUDrawingElementGetCastsShadows(SUDrawingElementRef elem, bool* casts_
170
170
 
171
171
  /**
172
172
  @brief Sets the receives shadows flag of a drawing element.
173
- @param[in] elem The drawing element.
174
- @param[in] receives_shadows_flag The casts shadows flag to set.
173
+ @param[in,out] elem The drawing element.
174
+ @param[in] receives_shadows_flag The casts shadows flag to set.
175
175
  @related SUDrawingElementRef
176
176
  @return
177
177
  - \ref SU_ERROR_NONE on success
@@ -92,7 +92,7 @@ SU_RESULT SUEdgeCreate(SUEdgeRef* edge, const struct SUPoint3D* start, const str
92
92
 
93
93
  The edge object must have been created with SUEdgeCreate() and not
94
94
  subsequently associated with a parent object (e.g. SUEntitiesAddEdges()).
95
- @param[in] edge The edge object.
95
+ @param[in,out] edge The edge object.
96
96
  @related SUEdgeRef
97
97
  @return
98
98
  - \ref SU_ERROR_NONE on success
@@ -140,8 +140,8 @@ SU_RESULT SUEdgeGetEndVertex(SUEdgeRef edge, SUVertexRef* vertex);
140
140
 
141
141
  /**
142
142
  @brief Sets the soft flag of an edge object.
143
- @param[in] edge The edge object.
144
- @param[in] soft_flag The soft flag to set.
143
+ @param[in,out] edge The edge object.
144
+ @param[in] soft_flag The soft flag to set.
145
145
  @related SUEdgeRef
146
146
  @return
147
147
  - \ref SU_ERROR_NONE on success
@@ -163,8 +163,8 @@ SU_RESULT SUEdgeGetSoft(SUEdgeRef edge, bool* soft_flag);
163
163
 
164
164
  /**
165
165
  @brief Sets the smooth flag of an edge object.
166
- @param[in] edge The edge object.
167
- @param[in] smooth_flag The smooth flag to set.
166
+ @param[in,out] edge The edge object.
167
+ @param[in] smooth_flag The smooth flag to set.
168
168
  @related SUEdgeRef
169
169
  @return
170
170
  - \ref SU_ERROR_NONE on success
@@ -238,8 +238,8 @@ SU_RESULT SUEdgeGetLengthWithTransform(
238
238
 
239
239
  /**
240
240
  @brief Sets the color of an edge object.
241
- @param[in] edge The edge object.
242
- @param[in] color The color object to set.
241
+ @param[in,out] edge The edge object.
242
+ @param[in] color The color object to set.
243
243
  @related SUEdgeRef
244
244
  @return
245
245
  - \ref SU_ERROR_NONE on success