scriptup 2024.0.5 → 2024.0.6

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 (57) hide show
  1. checksums.yaml +4 -4
  2. data/ext/attribute_dictionaries.c +1 -1
  3. data/ext/color.c +3 -3
  4. data/ext/component_definition.c +2 -2
  5. data/ext/definition_list.c +1 -1
  6. data/ext/entity.c +4 -3
  7. data/ext/material.c +4 -7
  8. data/ext/utils.h +4 -4
  9. data/sketchup-sdk-win/binaries/layout/x64/LayOutAPI.dll +0 -0
  10. data/sketchup-sdk-win/binaries/layout/x64/LayOutAPI.lib +0 -0
  11. data/sketchup-sdk-win/binaries/layout/x64/LayOutControllers.dll +0 -0
  12. data/sketchup-sdk-win/binaries/layout/x64/LayOutModel.dll +0 -0
  13. data/sketchup-sdk-win/binaries/layout/x64/LayOutRTF.dll +0 -0
  14. data/sketchup-sdk-win/binaries/layout/x64/LayOutUtils.dll +0 -0
  15. data/sketchup-sdk-win/binaries/layout/x64/SketchUpCommonPreferences.dll +0 -0
  16. data/sketchup-sdk-win/binaries/layout/x64/SketchUpViewerAPI.dll +0 -0
  17. data/sketchup-sdk-win/binaries/layout/x64/SketchUpViewerAPI.lib +0 -0
  18. data/sketchup-sdk-win/binaries/layout/x64/pdflib.dll +0 -0
  19. data/sketchup-sdk-win/headers/LayOutAPI/application/application.h +117 -0
  20. data/sketchup-sdk-win/headers/LayOutAPI/common.h +22 -0
  21. data/sketchup-sdk-win/headers/LayOutAPI/geometry/geometry.h +78 -0
  22. data/sketchup-sdk-win/headers/LayOutAPI/initialize.h +36 -0
  23. data/sketchup-sdk-win/headers/LayOutAPI/layout.h +49 -0
  24. data/sketchup-sdk-win/headers/LayOutAPI/model/angulardimension.h +468 -0
  25. data/sketchup-sdk-win/headers/LayOutAPI/model/autotextdefinition.h +569 -0
  26. data/sketchup-sdk-win/headers/LayOutAPI/model/autotextdefinitionlist.h +79 -0
  27. data/sketchup-sdk-win/headers/LayOutAPI/model/connectionpoint.h +107 -0
  28. data/sketchup-sdk-win/headers/LayOutAPI/model/defs.h +42 -0
  29. data/sketchup-sdk-win/headers/LayOutAPI/model/dictionary.h +120 -0
  30. data/sketchup-sdk-win/headers/LayOutAPI/model/document.h +864 -0
  31. data/sketchup-sdk-win/headers/LayOutAPI/model/documentexportoptions.h +59 -0
  32. data/sketchup-sdk-win/headers/LayOutAPI/model/ellipse.h +78 -0
  33. data/sketchup-sdk-win/headers/LayOutAPI/model/entity.h +330 -0
  34. data/sketchup-sdk-win/headers/LayOutAPI/model/entityiterator.h +49 -0
  35. data/sketchup-sdk-win/headers/LayOutAPI/model/entitylist.h +114 -0
  36. data/sketchup-sdk-win/headers/LayOutAPI/model/formattedtext.h +397 -0
  37. data/sketchup-sdk-win/headers/LayOutAPI/model/grid.h +251 -0
  38. data/sketchup-sdk-win/headers/LayOutAPI/model/group.h +243 -0
  39. data/sketchup-sdk-win/headers/LayOutAPI/model/image.h +146 -0
  40. data/sketchup-sdk-win/headers/LayOutAPI/model/imagerep.h +109 -0
  41. data/sketchup-sdk-win/headers/LayOutAPI/model/label.h +332 -0
  42. data/sketchup-sdk-win/headers/LayOutAPI/model/layer.h +207 -0
  43. data/sketchup-sdk-win/headers/LayOutAPI/model/layerinstance.h +117 -0
  44. data/sketchup-sdk-win/headers/LayOutAPI/model/layerlist.h +69 -0
  45. data/sketchup-sdk-win/headers/LayOutAPI/model/lineardimension.h +456 -0
  46. data/sketchup-sdk-win/headers/LayOutAPI/model/page.h +261 -0
  47. data/sketchup-sdk-win/headers/LayOutAPI/model/pageinfo.h +372 -0
  48. data/sketchup-sdk-win/headers/LayOutAPI/model/pagelist.h +81 -0
  49. data/sketchup-sdk-win/headers/LayOutAPI/model/path.h +464 -0
  50. data/sketchup-sdk-win/headers/LayOutAPI/model/rectangle.h +240 -0
  51. data/sketchup-sdk-win/headers/LayOutAPI/model/referenceentity.h +120 -0
  52. data/sketchup-sdk-win/headers/LayOutAPI/model/sketchupmodel.h +624 -0
  53. data/sketchup-sdk-win/headers/LayOutAPI/model/skpfilereference.h +94 -0
  54. data/sketchup-sdk-win/headers/LayOutAPI/model/style.h +1080 -0
  55. data/sketchup-sdk-win/headers/LayOutAPI/model/table.h +470 -0
  56. data/sketchup-sdk-win/headers/LayOutAPI/model/typed_value.h +156 -0
  57. metadata +50 -2
@@ -0,0 +1,624 @@
1
+ // Copyright 2015-2023 Trimble Inc. All rights reserved.
2
+ // This file is intended for public distribution.
3
+
4
+ #ifndef LAYOUT_MODEL_SKETCHUPMODEL_H_
5
+ #define LAYOUT_MODEL_SKETCHUPMODEL_H_
6
+
7
+ #include <LayOutAPI/common.h>
8
+ #include <LayOutAPI/geometry/geometry.h>
9
+ #include <LayOutAPI/model/defs.h>
10
+ #include <SketchUpAPI/model/defs.h>
11
+
12
+ /**
13
+ @struct LOSketchUpModelRef
14
+ @brief References a SketchUp model viewport entity.
15
+ */
16
+
17
+ /**
18
+ @enum LOSketchUpModelRenderMode
19
+ @brief Defines the different rendering modes available for a SketchUp model.
20
+ @note New for LayOut 2023.1, API 8.1 is the value LOSketchUpModelRenderMode_NoOverride.
21
+ The value is only used for the document render mode override, to indicate that
22
+ the output render mode should match the edit render mode, which is set per LOSketchUpModelRef.
23
+ */
24
+ typedef enum {
25
+ LOSketchUpModelRenderMode_NoOverride = -1, ///< Output render mode matches edit render mode.
26
+ LOSketchUpModelRenderMode_Raster = 0, ///< Raster rendering.
27
+ LOSketchUpModelRenderMode_Hybrid, ///< Hybrid rendering.
28
+ LOSketchUpModelRenderMode_Vector, ///< Vector rendering.
29
+ LONumSketchUpModelRenderModes
30
+ } LOSketchUpModelRenderMode;
31
+
32
+ /**
33
+ @enum LOSketchUpModelStandardView
34
+ @brief Defines the standard views available for a SketchUp model. Relative views
35
+ are not necessarily aligned to the corresponding axes like regular views,
36
+ but rather they maintain the alignment from the previous position of the
37
+ camera.
38
+ */
39
+ typedef enum {
40
+ LOSketchUpModelStandardView_Top = 0, ///< Top. This view is aligned with the X and Y axes.
41
+ LOSketchUpModelStandardView_RelativeTop, ///< Top (Relative). This top view is oriented relative
42
+ ///< to the previous camera position.
43
+ LOSketchUpModelStandardView_Bottom, ///< Bottom. This view is aligned with the X and Y axes.
44
+ LOSketchUpModelStandardView_RelativeBottom, ///< Bottom (Relative). This bottom view is oriented
45
+ ///< relative to the previous camera position.
46
+ LOSketchUpModelStandardView_Front, ///< Front. This view is aligned with the X and Z axes.
47
+ LOSketchUpModelStandardView_Back, ///< Back. This view is aligned with the X and Z axes.
48
+ LOSketchUpModelStandardView_Left, ///< Left. This view is aligned with the Y and Z axes.
49
+ LOSketchUpModelStandardView_Right, ///< Right. This view is aligned with the Y and Z axes.
50
+ LOSketchUpModelStandardView_Iso, ///< Iso. This is aligned with the nearest isometric axes to the
51
+ ///< current view.
52
+ LONumSketchUpModelStandardViews
53
+ } LOSketchUpModelStandardView;
54
+
55
+ #ifdef __cplusplus
56
+ extern "C" {
57
+ #endif // __cplusplus
58
+
59
+ /**
60
+ @brief Creates a new SketchUp model object with the specified bounds that
61
+ references the specified SketchUp file.
62
+ @param[out] model The SketchUp model object.
63
+ @param[in] path The path to the SketchUp file.
64
+ @param[in] bounds The starting dimensions of the SketchUp model.
65
+ @return
66
+ - \ref SU_ERROR_NONE on success
67
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if model is NULL
68
+ - \ref SU_ERROR_OVERWRITE_VALID if *model already refers to a valid object
69
+ - \ref SU_ERROR_NULL_POINTER_INPUT if path is NULL
70
+ - \ref SU_ERROR_NULL_POINTER_INPUT if bounds is NULL
71
+ - \ref SU_ERROR_OUT_OF_RANGE if bounds has a width or height of zero
72
+ - \ref SU_ERROR_SERIALIZATION if the .skp file could not be loaded
73
+ - \ref SU_ERROR_NO_DATA if the .skp file could not be found
74
+ */
75
+ LO_RESULT LOSketchUpModelCreate(
76
+ LOSketchUpModelRef* model, const char* path, const LOAxisAlignedRect2D* bounds);
77
+
78
+ /**
79
+ @brief Adds a reference to a SketchUp model object.
80
+ @param[in] model The SketchUp model object.
81
+ @return
82
+ - \ref SU_ERROR_NONE on success
83
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
84
+ */
85
+ LO_RESULT LOSketchUpModelAddReference(LOSketchUpModelRef model);
86
+
87
+ /**
88
+ @brief Releases a SketchUp model object. The object will be invalidated if
89
+ releasing the last reference.
90
+ @param[in] model The SketchUp model object.
91
+ @return
92
+ - \ref SU_ERROR_NONE on success
93
+ - \ref SU_ERROR_NULL_POINTER_INPUT model is NULL
94
+ - \ref SU_ERROR_INVALID_INPUT *model does not refer to a valid object
95
+ */
96
+ LO_RESULT LOSketchUpModelRelease(LOSketchUpModelRef* model);
97
+
98
+ /**
99
+ @brief Converts from a \ref LOEntityRef to a \ref LOSketchUpModelRef.
100
+ This is essentially a downcast operation so the given \ref LOEntityRef
101
+ must be convertible to a \ref LOSketchUpModelRef.
102
+ @param[in] entity The entity object.
103
+ @return
104
+ - The converted \ref LOSketchUpModelRef if the downcast operation succeeds
105
+ - If not, the returned reference will be invalid
106
+ */
107
+ LO_EXPORT LOSketchUpModelRef LOSketchUpModelFromEntity(LOEntityRef entity);
108
+
109
+ /**
110
+ @brief Converts from a \ref LOSketchUpModelRef to a \ref LOEntityRef.
111
+ This is essentially an upcast operation.
112
+ @param[in] model The SketchUp model object.
113
+ @return
114
+ - The converted \ref LOEntityRef if model is a valid object
115
+ - If not, the returned reference will be invalid
116
+ */
117
+ LO_EXPORT LOEntityRef LOSketchUpModelToEntity(LOSketchUpModelRef model);
118
+
119
+ /**
120
+ @brief Gets the SUModelRef representation of the SketchUp model.
121
+ @since LayOut 2017, API 2.0
122
+ @param[in] model The SketchUp model object.
123
+ @param[out] sumodel The model reference object.
124
+ @return
125
+ - \ref SU_ERROR_NONE on success
126
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
127
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if sumodel is NULL
128
+ */
129
+ LO_RESULT LOSketchUpModelGetModel(LOSketchUpModelRef model, SUModelRef* sumodel);
130
+
131
+ /**
132
+ @brief Gets the render mode of the SketchUp model.
133
+ @param[in] model The SketchUp model object.
134
+ @param[out] render_mode The render mode of the SketchUp model.
135
+ @return
136
+ - \ref SU_ERROR_NONE on success
137
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
138
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if render_mode is NULL
139
+ */
140
+ LO_RESULT LOSketchUpModelGetRenderMode(
141
+ LOSketchUpModelRef model, LOSketchUpModelRenderMode* render_mode);
142
+
143
+ /**
144
+ @brief Sets the render mode of the SketchUp model.
145
+ @param[in] model The SketchUp model object.
146
+ @param[in] render_mode The new render mode for the SketchUp model.
147
+ @return
148
+ - \ref SU_ERROR_NONE on success
149
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
150
+ - \ref SU_ERROR_OUT_OF_RANGE if the value of render_mode is invalid
151
+ - \ref SU_ERROR_LAYER_LOCKED if model is on a locked layer
152
+ - \ref SU_ERROR_ENTITY_LOCKED if model is locked
153
+ */
154
+ LO_RESULT LOSketchUpModelSetRenderMode(
155
+ LOSketchUpModelRef model, LOSketchUpModelRenderMode render_mode);
156
+
157
+ /**
158
+ @brief Renders the SketchUp model. If the model belongs to a
159
+ \ref LODocumentRef, then the render will be performed at the
160
+ resolution set in document.page_info (see \ref LODocumentRef and
161
+ \ref LOPageInfoRef). Otherwise, the render will be performed at Low
162
+ resolution.
163
+ @param[in] model The SketchUp model object.
164
+ @return
165
+ - \ref SU_ERROR_NONE on success
166
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
167
+ - \ref SU_ERROR_LAYER_LOCKED if model is on a locked layer
168
+ - \ref SU_ERROR_ENTITY_LOCKED if model is locked
169
+ */
170
+ LO_RESULT LOSketchUpModelRender(LOSketchUpModelRef model);
171
+
172
+ /**
173
+ @brief Gets the status indicating whether the SketchUp model needs to be
174
+ rendered.
175
+ @param[in] model The SketchUp model object.
176
+ @param[out] render_needed True if the SketchUp model needs to be rendered.
177
+ @return
178
+ - \ref SU_ERROR_NONE on success
179
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
180
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if render_needed is NULL
181
+ */
182
+ LO_RESULT LOSketchUpModelIsRenderNeeded(LOSketchUpModelRef model, bool* render_needed);
183
+
184
+ /**
185
+ @brief Gets the number of scenes that are available for a SketchUp model. Use
186
+ this to determine the size of the array that should be passed to \ref
187
+ LOSketchUpModelGetAvailableScenes.
188
+ @param[in] model The SketchUp model object.
189
+ @param[out] number_of_scenes The number of scenes.
190
+ @return
191
+ - \ref SU_ERROR_NONE on success
192
+ - \ref SU_ERROR_INVALID_INPUT if model is an invalid object
193
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if number_of_scenes is NULL
194
+ */
195
+ LO_RESULT LOSketchUpModelGetNumberOfAvailableScenes(
196
+ LOSketchUpModelRef model, size_t* number_of_scenes);
197
+
198
+ /**
199
+ @brief Gets the array of scenes that are available for a SketchUp model. The
200
+ first scene returned will always be the default scene, called
201
+ "Last saved SketchUp View".
202
+ @param[in] model The SketchUp model object.
203
+ @param[in] len The maximum number of scenes to retrieve.
204
+ @param[out] scenes The names of the scenes retrieved.
205
+ @param[out] count The number of scenes retrieved.
206
+ @return
207
+ - \ref SU_ERROR_NONE on success
208
+ - \ref SU_ERROR_INVALID_INPUT if model is an invalid object
209
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if scenes or count is NULL
210
+ */
211
+ LO_RESULT LOSketchUpModelGetAvailableScenes(
212
+ LOSketchUpModelRef model, size_t len, SUStringRef scenes[], size_t* count);
213
+
214
+ /**
215
+ @brief Gets the most recently selected scene of the SketchUp model.
216
+ @param[in] model The SketchUp model object.
217
+ @param[out] scene_index The index of the SketchUp model's scene. This is an
218
+ index into the list of available scenes returned by
219
+ \ref LOSketchUpModelGetAvailableScenes.
220
+ @param[out] scene_modified Indicates whether or not the scene has been modified
221
+ in LayOut.
222
+ @return
223
+ - \ref SU_ERROR_NONE on success
224
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
225
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if scene_index or scene_modified is NULL
226
+ - \ref SU_ERROR_NO_DATA if the most recently selected scene no longer exists
227
+ */
228
+ LO_RESULT LOSketchUpModelGetCurrentScene(
229
+ LOSketchUpModelRef model, size_t* scene_index, bool* scene_modified);
230
+
231
+ /**
232
+ @brief Sets the scene of the SketchUp model.
233
+ @param[in] model The SketchUp model object.
234
+ @param[in] scene_index The index of the scene. This is an index into the list
235
+ of available scenes returned by \ref
236
+ LOSketchUpModelGetAvailableScenes.
237
+ @return
238
+ - \ref SU_ERROR_NONE on success
239
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
240
+ - \ref SU_ERROR_OUT_OF_RANGE if scene_index is greater than or equal to the
241
+ number of available scenes.
242
+ - \ref SU_ERROR_LAYER_LOCKED if model is on a locked layer
243
+ - \ref SU_ERROR_ENTITY_LOCKED if model is locked
244
+
245
+ */
246
+ LO_RESULT LOSketchUpModelSetCurrentScene(LOSketchUpModelRef model, size_t scene_index);
247
+
248
+ /**
249
+ @brief Gets whether the SketchUp model's camera has been modified.
250
+ @param[in] model The SketchUp model object.
251
+ @param[out] modified Indicates whether or not the camera has been modified
252
+ in LayOut.
253
+ @since LayOut 2020.1, API 5.1
254
+ @return
255
+ - \ref SU_ERROR_NONE on success
256
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
257
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if modified is NULL
258
+ */
259
+ LO_RESULT LOSketchUpModelGetCameraModified(LOSketchUpModelRef model, bool* modified);
260
+
261
+ /**
262
+ @brief Resets the SketchUp model's camera to the scene's setting.
263
+ @param[in] model The SketchUp model object.
264
+ @since LayOut 2020.1, API 5.1
265
+ @return
266
+ - \ref SU_ERROR_NONE on success
267
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
268
+ - \ref SU_ERROR_LAYER_LOCKED if model is on a locked layer
269
+ - \ref SU_ERROR_ENTITY_LOCKED if model is locked
270
+ */
271
+ LO_RESULT LOSketchUpModelResetCamera(LOSketchUpModelRef model);
272
+
273
+ /**
274
+ @brief Gets whether the SketchUp model's shadow or fog effects have been modified.
275
+ @param[in] model The SketchUp model object.
276
+ @param[out] modified Indicates whether or not the shadow or fog effects have
277
+ been modified in LayOut.
278
+ @since LayOut 2020.1, API 5.1
279
+ @return
280
+ - \ref SU_ERROR_NONE on success
281
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
282
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if modified is NULL
283
+ */
284
+ LO_RESULT LOSketchUpModelGetEffectsModified(LOSketchUpModelRef model, bool* modified);
285
+
286
+ /**
287
+ @brief Resets the SketchUp model's shadow and fog effects to the scene's settings.
288
+ @param[in] model The SketchUp model object.
289
+ @since LayOut 2020.1, API 5.1
290
+ @return
291
+ - \ref SU_ERROR_NONE on success
292
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
293
+ - \ref SU_ERROR_LAYER_LOCKED if model is on a locked layer
294
+ - \ref SU_ERROR_ENTITY_LOCKED if model is locked
295
+ */
296
+ LO_RESULT LOSketchUpModelResetEffects(LOSketchUpModelRef model);
297
+
298
+ /**
299
+ @brief Gets whether the SketchUp model's style has been modified.
300
+ @param[in] model The SketchUp model object.
301
+ @param[out] modified Indicates whether or not the style has been modified in
302
+ LayOut.
303
+ @since LayOut 2020.1, API 5.1
304
+ @return
305
+ - \ref SU_ERROR_NONE on success
306
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
307
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if modified is NULL
308
+ */
309
+ LO_RESULT LOSketchUpModelGetStyleModified(LOSketchUpModelRef model, bool* modified);
310
+
311
+ /**
312
+ @brief Resets the SketchUp model's style to the scene's setting.
313
+ @param[in] model The SketchUp model object.
314
+ @since LayOut 2020.1, API 5.1
315
+ @return
316
+ - \ref SU_ERROR_NONE on success
317
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
318
+ - \ref SU_ERROR_LAYER_LOCKED if model is on a locked layer
319
+ - \ref SU_ERROR_ENTITY_LOCKED if model is locked
320
+ */
321
+ LO_RESULT LOSketchUpModelResetStyle(LOSketchUpModelRef model);
322
+
323
+ /**
324
+ @brief Gets whether the SketchUp model's layers have been modified.
325
+ @note In SketchUp 2020, SketchUp "layers" were renamed to "tags". For
326
+ consistency with the SketchUp API, this will continue to refer to "tags"
327
+ as "layers".
328
+ @since LayOut 2020.1, API 5.1
329
+ @param[in] model The SketchUp model object.
330
+ @param[out] modified Indicates whether or not the tag have been modified in
331
+ LayOut.
332
+ @return
333
+ - \ref SU_ERROR_NONE on success
334
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
335
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if modified is NULL
336
+ */
337
+ LO_RESULT LOSketchUpModelGetLayersModified(LOSketchUpModelRef model, bool* modified);
338
+
339
+ /**
340
+ @brief Resets the SketchUp model's layers to the scene's setting.
341
+ @note In SketchUp 2020, SketchUp "layers" were renamed to "tags". For
342
+ consistency with the SketchUp API, this will continue to refer to "tags"
343
+ as "layers".
344
+ @since LayOut 2020.1, API 5.1
345
+ @param[in] model The SketchUp model object.
346
+ @return
347
+ - \ref SU_ERROR_NONE on success
348
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
349
+ - \ref SU_ERROR_LAYER_LOCKED if model is on a locked layer
350
+ - \ref SU_ERROR_ENTITY_LOCKED if model is locked
351
+ */
352
+ LO_RESULT LOSketchUpModelResetLayers(LOSketchUpModelRef model);
353
+
354
+ /**
355
+ @brief Gets the status of whether or not the background is displayed for the
356
+ SketchUp model. This setting only applies when the render mode is
357
+ \ref LOSketchUpModelRenderMode_Vector.
358
+ @param[in] model The SketchUp model object.
359
+ @param[out] display_background True if the background is displayed.
360
+ @return
361
+ - \ref SU_ERROR_NONE on success
362
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
363
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if display_background is NULL
364
+ */
365
+ LO_RESULT LOSketchUpModelGetDisplayBackground(LOSketchUpModelRef model, bool* display_background);
366
+
367
+ /**
368
+ @brief Sets the status of whether or not the background is displayed for the
369
+ SketchUp model. This setting only applies when the render mode is
370
+ \ref LOSketchUpModelRenderMode_Vector.
371
+ @param[in] model The SketchUp model object.
372
+ @param[in] display_background True if the background should be displayed.
373
+ @return
374
+ - \ref SU_ERROR_NONE on success
375
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
376
+ - \ref SU_ERROR_LAYER_LOCKED if model is on a locked layer
377
+ - \ref SU_ERROR_ENTITY_LOCKED if model is locked
378
+ */
379
+ LO_RESULT LOSketchUpModelSetDisplayBackground(LOSketchUpModelRef model, bool display_background);
380
+
381
+ /**
382
+ @brief Gets the line weight in points for the SketchUp model.
383
+ @param[in] model The SketchUp model object.
384
+ @param[out] line_weight Line weight in points.
385
+ @return
386
+ - \ref SU_ERROR_NONE on success
387
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
388
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if line_weight is NULL
389
+ */
390
+ LO_RESULT LOSketchUpModelGetLineWeight(LOSketchUpModelRef model, double* line_weight);
391
+
392
+ /**
393
+ @brief Sets the line weight in points for the SketchUp model.
394
+ @param[in] model The SketchUp model object.
395
+ @param[in] line_weight Line weight in points.
396
+ @return
397
+ - \ref SU_ERROR_NONE on success
398
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
399
+ - \ref SU_ERROR_OUT_OF_RANGE if line_weight is less than 0.01
400
+ - \ref SU_ERROR_LAYER_LOCKED if model is on a locked layer
401
+ - \ref SU_ERROR_ENTITY_LOCKED if model is locked
402
+ */
403
+ LO_RESULT LOSketchUpModelSetLineWeight(LOSketchUpModelRef model, double line_weight);
404
+
405
+ /**
406
+ @brief Gets the scale for dashes in the SketchUp model. A scale value of 0.0
407
+ means the dashes are scaled based on the line weight.
408
+ @since LayOut 2019, API 4.0
409
+ @param[in] model The SketchUp model object.
410
+ @param[out] dash_scale Dash scale. Will be in the range [0, 10].
411
+ @return
412
+ - \ref SU_ERROR_NONE on success
413
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
414
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if dash_scale is NULL
415
+ */
416
+ LO_RESULT LOSketchUpModelGetDashScale(LOSketchUpModelRef model, double* dash_scale);
417
+
418
+ /**
419
+ @brief Sets the scale for dashes in the SketchUp model. A scale value of 0.0 or
420
+ lower will "auto" scale the dashes based on the line weight.
421
+ @since LayOut 2019, API 4.0
422
+ @param[in] model The SketchUp model object.
423
+ @param[in] dash_scale Dash scale. A value less than zero will be set to 0.
424
+ @return
425
+ - \ref SU_ERROR_NONE on success
426
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
427
+ - \ref SU_ERROR_LAYER_LOCKED if model is on a locked layer
428
+ - \ref SU_ERROR_ENTITY_LOCKED if model is locked
429
+ */
430
+ LO_RESULT LOSketchUpModelSetDashScale(LOSketchUpModelRef model, double dash_scale);
431
+
432
+ /**
433
+ @brief Gets whether or not the view is rendered in perspective mode.
434
+ @param[in] model The SketchUp model object.
435
+ @param[out] perspective Whether or not the view is rendered in perspective mode.
436
+ @return
437
+ - \ref SU_ERROR_NONE on success
438
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
439
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if perspective is NULL
440
+ */
441
+ LO_RESULT LOSketchUpModelGetPerspective(LOSketchUpModelRef model, bool* perspective);
442
+
443
+ /**
444
+ @brief Sets whether or not the view is rendered in perspective mode.
445
+ @param[in] model The SketchUp model object.
446
+ @param[in] perspective Whether or not the view should be rendered in
447
+ perspective mode.
448
+ @return
449
+ - \ref SU_ERROR_NONE on success
450
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
451
+ - \ref SU_ERROR_LAYER_LOCKED if model is on a locked layer
452
+ - \ref SU_ERROR_ENTITY_LOCKED if model is locked
453
+ */
454
+ LO_RESULT LOSketchUpModelSetPerspective(LOSketchUpModelRef model, bool perspective);
455
+
456
+ /**
457
+ @brief Gets the standard view that a SketchUp model is currently set to.
458
+ @param[in] model The SketchUp model object.
459
+ @param[out] view The standard view that the SketchUp model is currently set to.
460
+ @return
461
+ - \ref SU_ERROR_NONE on success
462
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
463
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if view is NULL
464
+ - \ref SU_ERROR_NO_DATA if the SketchUp model is not currently set to a
465
+ standard view
466
+ */
467
+ LO_RESULT LOSketchUpModelGetStandardView(
468
+ LOSketchUpModelRef model, LOSketchUpModelStandardView* view);
469
+
470
+ /**
471
+ @brief Sets a SketchUp model to use a standard view.
472
+ @param[in] model The SketchUp model object.
473
+ @param[in] view The standard view to use.
474
+ - \ref SU_ERROR_NONE on success
475
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
476
+ - \ref SU_ERROR_LAYER_LOCKED if model is on a locked layer
477
+ - \ref SU_ERROR_ENTITY_LOCKED if model is locked
478
+ - \ref SU_ERROR_OUT_OF_RANGE if view specifies an invalid value
479
+ */
480
+ LO_RESULT LOSketchUpModelSetStandardView(
481
+ LOSketchUpModelRef model, LOSketchUpModelStandardView view);
482
+
483
+ /**
484
+ @brief Gets the scale of a SketchUp model. This is only valid to call for
485
+ models that are rendered in orthographic (non-perspective) mode.
486
+ @param[in] model The SketchUp model object.
487
+ @param[out] scale The SketchUp model's scale.
488
+ @return
489
+ - \ref SU_ERROR_NONE on success
490
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
491
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if scale is NULL
492
+ - \ref SU_ERROR_NO_DATA if model is currently rendered in perspective mode.
493
+ */
494
+ LO_RESULT LOSketchUpModelGetScale(LOSketchUpModelRef model, double* scale);
495
+
496
+ /**
497
+ @brief Sets the scale of a SketchUp model. This is only valid to call for
498
+ models that are rendered in orthographic (non-perspective) mode.
499
+ @param[in] model The SketchUp model object.
500
+ @param[in] scale The new scale for the SketchUp model.
501
+ @return
502
+ - \ref SU_ERROR_NONE on success
503
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
504
+ - \ref SU_ERROR_GENERIC if model is rendered in perspective mode
505
+ - \ref SU_ERROR_OUT_OF_RANGE if scale is less than 0.0000001
506
+ - \ref SU_ERROR_LAYER_LOCKED if model is on a locked layer
507
+ - \ref SU_ERROR_ENTITY_LOCKED if model is locked
508
+ */
509
+ LO_RESULT LOSketchUpModelSetScale(LOSketchUpModelRef model, double scale);
510
+
511
+ /**
512
+ @brief Gets whether or not the scale is preserved when the SketchUp model is
513
+ resized.
514
+ @param[in] model The SketchUp model object.
515
+ @param[out] preserve_scale True if the scale is preserved on resize.
516
+ @return
517
+ - \ref SU_ERROR_NONE on success
518
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
519
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if preserve_scale is NULL
520
+ */
521
+ LO_RESULT LOSketchUpModelGetPreserveScaleOnResize(LOSketchUpModelRef model, bool* preserve_scale);
522
+
523
+ /**
524
+ @brief Sets whether or not the scale is preserved when the SketchUp model is
525
+ resized.
526
+ @param[in] model The SketchUp model object.
527
+ @param[in] preserve_scale True if the scale should be preserved on resize.
528
+ @return
529
+ - \ref SU_ERROR_NONE on success
530
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
531
+ - \ref SU_ERROR_LAYER_LOCKED if model is on a locked layer
532
+ - \ref SU_ERROR_ENTITY_LOCKED if model is locked
533
+ */
534
+ LO_RESULT LOSketchUpModelSetPreserveScaleOnResize(LOSketchUpModelRef model, bool preserve_scale);
535
+
536
+ /**
537
+ @brief Converts a 3D model space point in the SketchUp model to a 2D paper
538
+ space point on the page.
539
+ @param[in] model The SketchUp model object.
540
+ @param[in] model_point The 3D model space point.
541
+ @param[out] paper_point The 2D paper space point.
542
+ @return
543
+ - \ref SU_ERROR_NONE on success
544
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
545
+ - \ref SU_ERROR_NULL_POINTER_INPUT if model_point is NULL
546
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if paper_point is NULL
547
+ */
548
+ LO_RESULT LOSketchUpModelConvertModelPointToPaperPoint(
549
+ LOSketchUpModelRef model, const LOPoint3D* model_point, LOPoint2D* paper_point);
550
+
551
+ /**
552
+ @brief Returns any clip mask assigned to the SketchUp model.
553
+ @since LayOut 2017, API 2.0
554
+ @param[in] model The SketchUp model object.
555
+ @param[out] clip_mask The clip mask of the SketchUp model.
556
+ @return
557
+ - \ref SU_ERROR_NONE on success
558
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
559
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if clip_mask is NULL
560
+ - \ref SU_ERROR_OVERWRITE_VALID if *clip_mask already refers to a valid object
561
+ - \ref SU_ERROR_NO_DATA if the model is not being clipped by a clip mask
562
+ */
563
+ LO_RESULT LOSketchUpModelGetClipMask(LOSketchUpModelRef model, LOEntityRef* clip_mask);
564
+
565
+ /**
566
+ @brief Sets the clip mask of the SketchUp model. A clip mask defines a region
567
+ of the entity that is visible. This allows you to crop with arbitrary
568
+ shapes. This operation will replace any clip mask that is already
569
+ assigned to this model. The entity being used must not be already part
570
+ of a document or group. The clip mask entity must be either a rectangle,
571
+ ellipse or a path.
572
+ @note Starting in LayOut 2020.1, API 5.1, clip_mask may be SU_INVALID, which
573
+ will remove the existing clip mask, if any.
574
+ @since LayOut 2017, API 2.0
575
+ @param[in] model The SketchUp model object.
576
+ @param[in] clip_mask The new clip mask for the SketchUp model.
577
+ @return
578
+ - \ref SU_ERROR_NONE on success
579
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
580
+ - \ref SU_ERROR_GENERIC if clip_mask is already in a document or group
581
+ - \ref SU_ERROR_UNSUPPORTED if clip_mask is not a rectangle, ellipse, or path
582
+ - \ref SU_ERROR_LAYER_LOCKED if model is on a locked layer
583
+ - \ref SU_ERROR_ENTITY_LOCKED if model is locked
584
+ */
585
+ LO_RESULT LOSketchUpModelSetClipMask(LOSketchUpModelRef model, LOEntityRef clip_mask);
586
+
587
+ /**
588
+ @brief Creates the entities that represent the SketchUp model in its exploded
589
+ form and adds them to a \ref LOEntityListRef. It is NOT necessary to
590
+ explicitly release these entities, since \ref LOEntityListRef itself
591
+ adds a reference to the entities and will release them when they are
592
+ removed from the list or when the list is released.
593
+ @note Starting in LayOut 2018 M0, API 3.0 - an exploded raster-rendered model
594
+ will now wrap the \ref LOImageRef in a \ref LOGroupRef.
595
+ @param[in] model The SketchUp model object.
596
+ @param[in] entity_list The entity list object to add the new entities to.
597
+ @return
598
+ - \ref SU_ERROR_NONE on success
599
+ - \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
600
+ - \ref SU_ERROR_INVALID_INPUT if entity_list does not refer to a valid object
601
+ */
602
+ LO_RESULT LOSketchUpModelGetExplodedEntities(LOSketchUpModelRef model, LOEntityListRef entity_list);
603
+
604
+ /**
605
+ @brief Creates the entities that represent the SketchUp model using its output settings and adds
606
+ them to a \ref LOEntityListRef.
607
+
608
+ This will use the document's output render mode override setting for SketchUp model viewports, and
609
+ the raster output image quality set by \ref LOPageInfoSetOutputResolution. It is NOT necessary to
610
+ explicitly release these entities, since \ref LOEntityListRef itself adds a reference to the
611
+ entities and will release them when they are removed from the list or when the list is released.
612
+ @since Layout 2023.1, API 8.1
613
+ @param[in] model The SketchUp model object.
614
+ @param[in] entity_list The entity list object to add the new entities to.
615
+ @return
616
+ - \ref SU_ERROR_NONE on success
617
+ - \ref SU_ERROR_INVALID_INPUT if \p model does not refer to a valid object
618
+ - \ref SU_ERROR_INVALID_INPUT if \p entity_list does not refer to a valid object
619
+ */
620
+ LO_RESULT LOSketchUpModelGetOutputEntities(LOSketchUpModelRef model, LOEntityListRef entity_list);
621
+ #ifdef __cplusplus
622
+ } // end extern "C"
623
+ #endif // __cplusplus
624
+ #endif // LAYOUT_MODEL_SKETCHUPMODEL_H_