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.
- checksums.yaml +4 -4
- data/ext/attribute_dictionaries.c +1 -1
- data/ext/color.c +3 -3
- data/ext/component_definition.c +2 -2
- data/ext/definition_list.c +1 -1
- data/ext/entity.c +4 -3
- data/ext/material.c +4 -7
- data/ext/utils.h +4 -4
- data/sketchup-sdk-win/binaries/layout/x64/LayOutAPI.dll +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/LayOutAPI.lib +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/LayOutControllers.dll +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/LayOutModel.dll +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/LayOutRTF.dll +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/LayOutUtils.dll +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/SketchUpCommonPreferences.dll +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/SketchUpViewerAPI.dll +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/SketchUpViewerAPI.lib +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/pdflib.dll +0 -0
- data/sketchup-sdk-win/headers/LayOutAPI/application/application.h +117 -0
- data/sketchup-sdk-win/headers/LayOutAPI/common.h +22 -0
- data/sketchup-sdk-win/headers/LayOutAPI/geometry/geometry.h +78 -0
- data/sketchup-sdk-win/headers/LayOutAPI/initialize.h +36 -0
- data/sketchup-sdk-win/headers/LayOutAPI/layout.h +49 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/angulardimension.h +468 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/autotextdefinition.h +569 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/autotextdefinitionlist.h +79 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/connectionpoint.h +107 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/defs.h +42 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/dictionary.h +120 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/document.h +864 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/documentexportoptions.h +59 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/ellipse.h +78 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/entity.h +330 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/entityiterator.h +49 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/entitylist.h +114 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/formattedtext.h +397 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/grid.h +251 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/group.h +243 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/image.h +146 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/imagerep.h +109 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/label.h +332 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/layer.h +207 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/layerinstance.h +117 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/layerlist.h +69 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/lineardimension.h +456 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/page.h +261 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/pageinfo.h +372 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/pagelist.h +81 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/path.h +464 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/rectangle.h +240 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/referenceentity.h +120 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/sketchupmodel.h +624 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/skpfilereference.h +94 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/style.h +1080 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/table.h +470 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/typed_value.h +156 -0
- metadata +50 -2
@@ -0,0 +1,107 @@
|
|
1
|
+
// Copyright 2015 Trimble Navigation Ltd. All rights reserved.
|
2
|
+
// This file is intended for public distribution.
|
3
|
+
|
4
|
+
#ifndef LAYOUT_MODEL_CONNECTIONPOINT_H_
|
5
|
+
#define LAYOUT_MODEL_CONNECTIONPOINT_H_
|
6
|
+
|
7
|
+
#include <LayOutAPI/common.h>
|
8
|
+
#include <LayOutAPI/geometry/geometry.h>
|
9
|
+
#include <LayOutAPI/model/defs.h>
|
10
|
+
|
11
|
+
/**
|
12
|
+
@struct LOConnectionPointRef
|
13
|
+
@brief References a connection point. A connection point defines a target
|
14
|
+
point to which a label or dimension can connect.
|
15
|
+
*/
|
16
|
+
|
17
|
+
#ifdef __cplusplus
|
18
|
+
extern "C" {
|
19
|
+
#endif // __cplusplus
|
20
|
+
|
21
|
+
/**
|
22
|
+
@brief Creates a new connection point object for the given entity at the given
|
23
|
+
2D point.
|
24
|
+
@param[out] connection_point The connection point object.
|
25
|
+
@param[in] entity The entity object.
|
26
|
+
@param[in] point The position of the connection point.
|
27
|
+
@param[in] aperture The search radius to use when looking for geometry
|
28
|
+
to connect to.
|
29
|
+
@return
|
30
|
+
- \ref SU_ERROR_NONE on success
|
31
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if connection_point is NULL
|
32
|
+
- \ref SU_ERROR_OVERWRITE_VALID if *connection_point already refers to a valid
|
33
|
+
object
|
34
|
+
- \ref SU_ERROR_INVALID_INPUT if entity does not refer to a valid object
|
35
|
+
- \ref SU_ERROR_OUT_OF_RANGE if aperture is less than or equal to 0
|
36
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if point is NULL
|
37
|
+
- \ref SU_ERROR_GENERIC if the entity is not in a document
|
38
|
+
- \ref SU_ERROR_NO_DATA if no connection point could be made
|
39
|
+
*/
|
40
|
+
LO_RESULT LOConnectionPointCreate(
|
41
|
+
LOConnectionPointRef* connection_point, LOEntityRef entity, const LOPoint2D* point,
|
42
|
+
double aperture);
|
43
|
+
|
44
|
+
/**
|
45
|
+
@brief Creates a new connection point object for the given SketchUp model entity
|
46
|
+
at the given 3D point in model space. Note that connection points created
|
47
|
+
via this function will have no persistent ID assigned to them, resulting
|
48
|
+
in a connection point that does not update when geometry is modified.
|
49
|
+
@param[out] connection_point The connection point object.
|
50
|
+
@param[in] model The SketchUp model object.
|
51
|
+
@param[in] point3d The 3D position of the connection point in model
|
52
|
+
space.
|
53
|
+
@return
|
54
|
+
- \ref SU_ERROR_NONE on success
|
55
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if connection_point is NULL
|
56
|
+
- \ref SU_ERROR_OVERWRITE_VALID if *connection_point already refers to a valid
|
57
|
+
object
|
58
|
+
- \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
|
59
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if point3d is NULL
|
60
|
+
- \ref SU_ERROR_GENERIC if the model is not in a document
|
61
|
+
*/
|
62
|
+
LO_RESULT LOConnectionPointCreateFromPoint3D(
|
63
|
+
LOConnectionPointRef* connection_point, LOSketchUpModelRef model, const LOPoint3D* point3d);
|
64
|
+
|
65
|
+
/**
|
66
|
+
@brief Creates a new connection point object for the given SketchUp model entity
|
67
|
+
at the given 3D point in model space. Note that connection points created
|
68
|
+
via this function have a persistent ID assigned to them, resulting in a
|
69
|
+
connection point that updates when the geometry is modified.
|
70
|
+
@note Starting in LayOut 2020.1, API 5.1, SU_ERROR_NO_DATA will be returned if
|
71
|
+
persistent_id isn't valid for the given model.
|
72
|
+
@since LO 2017, API 2.0
|
73
|
+
@param[out] connection_point The connection point object.
|
74
|
+
@param[in] model The SketchUp model object.
|
75
|
+
@param[in] point3d The 3D position of the connection point in model.
|
76
|
+
@param[in] persistent_id The PID of the entity.
|
77
|
+
@return
|
78
|
+
- \ref SU_ERROR_NONE on success
|
79
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if connection_point is NULL
|
80
|
+
- \ref SU_ERROR_OVERWRITE_VALID if *connection_point already refers to a valid
|
81
|
+
object
|
82
|
+
- \ref SU_ERROR_INVALID_INPUT if model does not refer to a valid object
|
83
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if point3d or persistent_id is NULL
|
84
|
+
- \ref SU_ERROR_GENERIC if the model is not in a document
|
85
|
+
- \ref SU_ERROR_NO_DATA if persistent_id does not refer to a valid path
|
86
|
+
*/
|
87
|
+
LO_RESULT LOConnectionPointCreateFromPID(
|
88
|
+
LOConnectionPointRef* connection_point, LOSketchUpModelRef model, const LOPoint3D* point3d,
|
89
|
+
const char* persistent_id);
|
90
|
+
|
91
|
+
/**
|
92
|
+
@brief Releases a connection point object. The object will be invalidated if
|
93
|
+
releasing the last reference.
|
94
|
+
@param[in] connection_point The connection point object.
|
95
|
+
@return
|
96
|
+
- \ref SU_ERROR_NONE on success
|
97
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if connection_point is NULL
|
98
|
+
- \ref SU_ERROR_INVALID_INPUT if *connection_point does not refer to a valid
|
99
|
+
object
|
100
|
+
*/
|
101
|
+
LO_RESULT LOConnectionPointRelease(LOConnectionPointRef* connection_point);
|
102
|
+
|
103
|
+
#ifdef __cplusplus
|
104
|
+
} // end extern "C"
|
105
|
+
#endif // __cplusplus
|
106
|
+
|
107
|
+
#endif // LAYOUT_MODEL_CONNECTIONPOINT_H_
|
@@ -0,0 +1,42 @@
|
|
1
|
+
// Copyright 2017-2022 Trimble Inc. All Rights Reserved.
|
2
|
+
|
3
|
+
#ifndef LAYOUT_MODEL_DEFS_H_
|
4
|
+
#define LAYOUT_MODEL_DEFS_H_
|
5
|
+
|
6
|
+
#include <SketchUpAPI/common.h>
|
7
|
+
|
8
|
+
#pragma pack(push, 8)
|
9
|
+
|
10
|
+
DEFINE_SU_TYPE(LOAngularDimensionRef)
|
11
|
+
DEFINE_SU_TYPE(LOAutoTextDefinitionRef)
|
12
|
+
DEFINE_SU_TYPE(LOAutoTextDefinitionListRef)
|
13
|
+
DEFINE_SU_TYPE(LOConnectionPointRef)
|
14
|
+
DEFINE_SU_TYPE(LODictionaryRef)
|
15
|
+
DEFINE_SU_TYPE(LODocumentRef)
|
16
|
+
DEFINE_SU_TYPE(LOEllipseRef)
|
17
|
+
DEFINE_SU_TYPE(LOEntityRef)
|
18
|
+
DEFINE_SU_TYPE(LOEntityIteratorRef)
|
19
|
+
DEFINE_SU_TYPE(LOEntityListRef)
|
20
|
+
DEFINE_SU_TYPE(LOFormattedTextRef)
|
21
|
+
DEFINE_SU_TYPE(LOGridRef)
|
22
|
+
DEFINE_SU_TYPE(LOGroupRef)
|
23
|
+
DEFINE_SU_TYPE(LOImageRef)
|
24
|
+
DEFINE_SU_TYPE(LOImageRepRef)
|
25
|
+
DEFINE_SU_TYPE(LOLabelRef)
|
26
|
+
DEFINE_SU_TYPE(LOLayerRef)
|
27
|
+
DEFINE_SU_TYPE(LOLayerInstanceRef)
|
28
|
+
DEFINE_SU_TYPE(LOLayerListRef)
|
29
|
+
DEFINE_SU_TYPE(LOLinearDimensionRef)
|
30
|
+
DEFINE_SU_TYPE(LOPageRef)
|
31
|
+
DEFINE_SU_TYPE(LOPageInfoRef)
|
32
|
+
DEFINE_SU_TYPE(LOPageListRef)
|
33
|
+
DEFINE_SU_TYPE(LOPathRef)
|
34
|
+
DEFINE_SU_TYPE(LORectangleRef)
|
35
|
+
DEFINE_SU_TYPE(LOSketchUpModelRef)
|
36
|
+
DEFINE_SU_TYPE(LOStyleRef)
|
37
|
+
DEFINE_SU_TYPE(LOTableRef)
|
38
|
+
DEFINE_SU_TYPE(LOTypedValueRef)
|
39
|
+
DEFINE_SU_TYPE(LOReferenceEntityRef)
|
40
|
+
|
41
|
+
#pragma pack(pop)
|
42
|
+
#endif
|
@@ -0,0 +1,120 @@
|
|
1
|
+
// Copyright 2015 Trimble Navigation Ltd. All rights reserved.
|
2
|
+
// This file is intended for public distribution.
|
3
|
+
|
4
|
+
#ifndef LAYOUT_MODEL_DICTIONARY_H_
|
5
|
+
#define LAYOUT_MODEL_DICTIONARY_H_
|
6
|
+
|
7
|
+
#include <LayOutAPI/common.h>
|
8
|
+
#include <LayOutAPI/model/defs.h>
|
9
|
+
|
10
|
+
/**
|
11
|
+
@struct LODictionaryRef
|
12
|
+
@brief References a dictionary. A dictionary maps string keys to
|
13
|
+
\ref LOTypedValueRef values.
|
14
|
+
*/
|
15
|
+
|
16
|
+
#ifdef __cplusplus
|
17
|
+
extern "C" {
|
18
|
+
#endif
|
19
|
+
|
20
|
+
/**
|
21
|
+
@brief Creates an new empty dictionary object.
|
22
|
+
@param[out] dictionary The newly created dictionary object.
|
23
|
+
@return
|
24
|
+
- \ref SU_ERROR_NONE on success
|
25
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if dictionary is NULL
|
26
|
+
- \ref SU_ERROR_OVERWRITE_VALID if *dictionary already refers to a valid object
|
27
|
+
*/
|
28
|
+
LO_RESULT LODictionaryCreate(LODictionaryRef* dictionary);
|
29
|
+
|
30
|
+
/**
|
31
|
+
@brief Releases a dictionary object. *dictionary will be set to invalid by
|
32
|
+
this function.
|
33
|
+
@param[in] dictionary The dictionary object.
|
34
|
+
@return
|
35
|
+
- \ref SU_ERROR_NONE on success
|
36
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if dictionary is NULL
|
37
|
+
- \ref SU_ERROR_INVALID_INPUT if *dictionary references an invalid object
|
38
|
+
*/
|
39
|
+
LO_RESULT LODictionaryRelease(LODictionaryRef* dictionary);
|
40
|
+
|
41
|
+
/**
|
42
|
+
@brief Retrieves the value associated with a given key from a dictionary.
|
43
|
+
@param[in] dictionary The dictionary object.
|
44
|
+
@param[in] key The key of the key-value pair. Assumed to be UTF-8
|
45
|
+
encoded.
|
46
|
+
@param[out] value The value retrieved. Must be a valid object, i.e.
|
47
|
+
must have been created via \ref LOTypedValueCreate.
|
48
|
+
@return
|
49
|
+
- \ref SU_ERROR_NONE on success
|
50
|
+
- \ref SU_ERROR_INVALID_INPUT if dictionary is an invalid object
|
51
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if key is NULL
|
52
|
+
- \ref SU_ERROR_INVALID_OUTPUT if value is an invalid object
|
53
|
+
- \ref SU_ERROR_NO_DATA if there is no value associated with the given key in
|
54
|
+
the dictionary
|
55
|
+
*/
|
56
|
+
LO_RESULT LODictionaryGetValue(LODictionaryRef dictionary, const char* key, LOTypedValueRef value);
|
57
|
+
|
58
|
+
/**
|
59
|
+
@brief Inserts a key-value pair into a dictionary object.
|
60
|
+
@param[in] dictionary The dictionary object.
|
61
|
+
@param[in] key The key of the key-value pair. Assumed to be UTF-8
|
62
|
+
encoded.
|
63
|
+
@param[in] value The value of the key-value pair.
|
64
|
+
@return
|
65
|
+
- \ref SU_ERROR_NONE on success
|
66
|
+
- \ref SU_ERROR_INVALID_INPUT if dictionary or value is an invalid object
|
67
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if key is NULL
|
68
|
+
*/
|
69
|
+
LO_RESULT LODictionarySetValue(LODictionaryRef dictionary, const char* key, LOTypedValueRef value);
|
70
|
+
|
71
|
+
/**
|
72
|
+
@brief Removes all of the key-value pairs from a dictionary.
|
73
|
+
@since LayOut 2018, API 3.0
|
74
|
+
@param[in] dictionary The dictionary object.
|
75
|
+
@return
|
76
|
+
- \ref SU_ERROR_NONE on success
|
77
|
+
- \ref SU_ERROR_INVALID_INPUT if dictionary is an invalid object
|
78
|
+
*/
|
79
|
+
LO_RESULT LODictionaryClear(LODictionaryRef dictionary);
|
80
|
+
|
81
|
+
/**
|
82
|
+
@brief Gets the number of entries in the dictionary.
|
83
|
+
@since LayOut 2018, API 3.0
|
84
|
+
@return
|
85
|
+
- \ref SU_ERROR_NONE on success
|
86
|
+
- \ref SU_ERROR_INVALID_INPUT if dictionary does not refer to a valid
|
87
|
+
object
|
88
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if out_number_of_keys is NULL
|
89
|
+
*/
|
90
|
+
LO_RESULT LODictionaryGetNumberOfKeys(LODictionaryRef dictionary, size_t* out_number_of_keys);
|
91
|
+
|
92
|
+
/**
|
93
|
+
@brief Gets all the keys in the dictionary.
|
94
|
+
@since LayOut 2018, API 3.0
|
95
|
+
@return
|
96
|
+
- \ref SU_ERROR_NONE on success.
|
97
|
+
- \ref SU_ERROR_INVALID_INPUT if dictionary refers to an invalid reference
|
98
|
+
- \ref SU_ERROR_OUT_OF_RANGE if key_array_length must be at least 1
|
99
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if out_key_array or
|
100
|
+
out_number_of_keys_copied is NULL
|
101
|
+
- \ref SU_ERROR_INVALID_OUTPUT if keys contains one or more invalid objects
|
102
|
+
*/
|
103
|
+
LO_RESULT LODictionaryGetKeys(
|
104
|
+
LODictionaryRef dictionary, size_t key_array_length, SUStringRef keys[],
|
105
|
+
size_t* out_number_of_keys_copied);
|
106
|
+
|
107
|
+
/**
|
108
|
+
@brief Remove the entry in the dictionary for the given key.
|
109
|
+
@since LayOut 2018, API 3.0
|
110
|
+
@return
|
111
|
+
- \ref SU_ERROR_NONE on success
|
112
|
+
- \ref SU_ERROR_INVALID_INPUT if dictionary or key refer to invalid references
|
113
|
+
- \ref SU_ERROR_NO_DATA if there is no value to delete for the given key
|
114
|
+
*/
|
115
|
+
LO_RESULT LODictionaryRemoveEntry(LODictionaryRef dictionary, const char* key);
|
116
|
+
#ifdef __cplusplus
|
117
|
+
} // extern "C" {
|
118
|
+
#endif
|
119
|
+
|
120
|
+
#endif // LAYOUT_MODEL_DICTIONARY_H_
|