scriptup 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.txt +11 -0
- data/README.md +5 -0
- data/ext/attribute_dictionaries.c +45 -0
- data/ext/attribute_dictionaries.h +3 -0
- data/ext/attribute_dictionary.c +156 -0
- data/ext/attribute_dictionary.h +3 -0
- data/ext/behavior.c +10 -0
- data/ext/behavior.h +3 -0
- data/ext/color.c +211 -0
- data/ext/color.h +3 -0
- data/ext/component_definition.c +188 -0
- data/ext/component_definition.h +3 -0
- data/ext/component_instance.c +10 -0
- data/ext/component_instance.h +3 -0
- data/ext/definition_list.c +145 -0
- data/ext/definition_list.h +3 -0
- data/ext/drawing_element.c +10 -0
- data/ext/drawing_element.h +3 -0
- data/ext/entities.c +11 -0
- data/ext/entities.h +3 -0
- data/ext/entity.c +253 -0
- data/ext/entity.h +3 -0
- data/ext/extconf.rb +38 -0
- data/ext/material.c +242 -0
- data/ext/material.h +3 -0
- data/ext/materials.c +80 -0
- data/ext/materials.h +3 -0
- data/ext/model.c +42 -0
- data/ext/model.h +3 -0
- data/ext/sketchup.c +89 -0
- data/ext/sketchup.h +4 -0
- data/ext/texture.c +9 -0
- data/ext/texture.h +3 -0
- data/ext/typed_value.c +84 -0
- data/ext/typed_value.h +5 -0
- data/ext/utils.h +80 -0
- data/lib/sketchup.rb +12 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/application.h +36 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/model.h +59 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/overlay.h +248 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/ruby_api.h +118 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/color.h +107 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/common.h +178 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/defs.h +19 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/extension_license.h +62 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/bounding_box.h +34 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/plane3d.h +153 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point2d.h +96 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point3d.h +98 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/ray3d.h +64 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/transformation.h +321 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/transformation2d.h +163 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector2d.h +235 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector3d.h +285 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry.h +152 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/modelexporterplugin.h +165 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/modelimporterplugin.h +183 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/pluginprogresscallback.h +84 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/initialize.h +43 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/length_formatter.h +424 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/arccurve.h +244 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/arrow_type.h +17 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/attribute_dictionary.h +161 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/axes.h +242 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/camera.h +398 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classification_attribute.h +89 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classification_info.h +125 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classifications.h +86 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_definition.h +588 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_instance.h +344 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/curve.h +143 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/defs.h +142 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension.h +222 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_linear.h +421 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_radial.h +194 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_style.h +253 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/drawing_element.h +198 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dynamic_component_attribute.h +92 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dynamic_component_info.h +70 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/edge.h +271 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/edge_use.h +214 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entities.h +834 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity.h +186 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity_list.h +80 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity_list_iterator.h +90 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/face.h +686 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/font.h +138 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/geometry.h +20 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/geometry_input.h +685 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/group.h +244 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/guide_line.h +155 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/guide_point.h +153 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/image.h +288 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/image_rep.h +275 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/instancepath.h +266 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/layer.h +265 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/layer_folder.h +301 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/line_style.h +211 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/line_styles.h +81 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/location.h +65 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/loop.h +182 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/material.h +390 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/mesh_helper.h +187 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model.h +1663 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model_version.h +49 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/opening.h +72 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/options_manager.h +79 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/options_provider.h +166 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/polyline3d.h +140 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/rendering_options.h +179 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/scene.h +836 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/schema.h +56 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/schema_type.h +26 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/section_plane.h +212 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/selection.h +156 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/shadow_info.h +147 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/skp.h +45 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/style.h +303 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/styles.h +190 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/text.h +384 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/texture.h +358 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/texture_writer.h +280 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/typed_value.h +390 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/uv_helper.h +79 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/vertex.h +154 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/sketchup.h +122 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/sketchup_info.h +65 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/slapi.h +16 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/transformation.h +16 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/unicodestring.h +239 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/utils/math_helpers.h +124 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonGeometry.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonGeoutils.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonImage.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonPreferences.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonUnits.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonUtils.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonZip.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Resources/Info.plist +50 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/SketchUpAPI +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/_CodeSignature/CodeResources +835 -0
- data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpAPI.dll +0 -0
- data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpAPI.lib +0 -0
- data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpCommonPreferences.dll +0 -0
- data/sketchup-sdk-win/binaries/sketchup/x64/sketchup.lib +0 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/application/application.h +36 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/application/model.h +59 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/application/overlay.h +248 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/application/ruby_api.h +118 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/color.h +107 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/common.h +178 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/defs.h +19 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/extension_license.h +62 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/bounding_box.h +34 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/plane3d.h +153 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point2d.h +96 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point3d.h +98 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/ray3d.h +64 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/transformation.h +321 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/transformation2d.h +163 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector2d.h +235 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector3d.h +285 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry.h +152 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/import_export/modelexporterplugin.h +165 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/import_export/modelimporterplugin.h +183 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/import_export/pluginprogresscallback.h +84 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/initialize.h +43 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/length_formatter.h +424 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/arccurve.h +244 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/arrow_type.h +17 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/attribute_dictionary.h +161 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/axes.h +242 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/camera.h +398 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/classification_attribute.h +89 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/classification_info.h +125 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/classifications.h +86 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/component_definition.h +588 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/component_instance.h +344 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/curve.h +143 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/defs.h +142 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension.h +222 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_linear.h +421 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_radial.h +194 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_style.h +253 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/drawing_element.h +198 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dynamic_component_attribute.h +92 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dynamic_component_info.h +70 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/edge.h +271 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/edge_use.h +214 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/entities.h +834 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/entity.h +186 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/entity_list.h +80 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/entity_list_iterator.h +90 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/face.h +686 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/font.h +138 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/geometry.h +20 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/geometry_input.h +685 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/group.h +244 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/guide_line.h +155 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/guide_point.h +153 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/image.h +288 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/image_rep.h +275 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/instancepath.h +266 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/layer.h +265 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/layer_folder.h +301 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/line_style.h +211 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/line_styles.h +81 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/location.h +65 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/loop.h +182 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/material.h +390 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/mesh_helper.h +187 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/model.h +1663 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/model_version.h +49 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/opening.h +72 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/options_manager.h +79 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/options_provider.h +166 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/polyline3d.h +140 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/rendering_options.h +179 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/scene.h +836 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/schema.h +56 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/schema_type.h +26 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/section_plane.h +212 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/selection.h +156 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/shadow_info.h +147 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/skp.h +45 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/style.h +303 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/styles.h +190 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/text.h +384 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/texture.h +358 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/texture_writer.h +280 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/typed_value.h +390 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/uv_helper.h +79 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/vertex.h +154 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/sketchup.h +122 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/sketchup_info.h +65 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/slapi.h +16 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/transformation.h +16 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/unicodestring.h +239 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/utils/math_helpers.h +124 -0
- metadata +313 -0
@@ -0,0 +1,588 @@
|
|
1
|
+
// Copyright 2013-2020 Trimble Inc. All Rights Reserved.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUComponentDefinitionRef.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_MODEL_COMPONENT_DEFINITION_H_
|
8
|
+
#define SKETCHUP_MODEL_COMPONENT_DEFINITION_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/geometry.h>
|
11
|
+
#include <SketchUpAPI/common.h>
|
12
|
+
#include <SketchUpAPI/unicodestring.h>
|
13
|
+
#include <SketchUpAPI/model/curve.h>
|
14
|
+
#include <SketchUpAPI/model/defs.h>
|
15
|
+
#include <SketchUpAPI/model/model_version.h>
|
16
|
+
#include <time.h>
|
17
|
+
|
18
|
+
#pragma pack(push, 8)
|
19
|
+
|
20
|
+
#if defined(__APPLE__)
|
21
|
+
// This is added to remove the missing declarations warning on the mac
|
22
|
+
// for an enum defined inside a structure. [SUSnapToBehavior]
|
23
|
+
#pragma GCC diagnostic push
|
24
|
+
#pragma GCC diagnostic ignored "-Wmissing-declarations"
|
25
|
+
#endif
|
26
|
+
|
27
|
+
#ifdef __cplusplus
|
28
|
+
extern "C" {
|
29
|
+
#endif
|
30
|
+
|
31
|
+
/**
|
32
|
+
@struct SUComponentDefinitionRef
|
33
|
+
@extends SUEntityRef
|
34
|
+
@brief References a component definition.
|
35
|
+
*/
|
36
|
+
|
37
|
+
/**
|
38
|
+
@struct SUComponentBehavior
|
39
|
+
@brief Describes how the component behaves in a SketchUp model, e.g. how it glues to surfaces.
|
40
|
+
*/
|
41
|
+
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
|
+
};
|
55
|
+
|
56
|
+
/**
|
57
|
+
How the component should snap to the surface where it's placed.
|
58
|
+
*/
|
59
|
+
enum SUSnapToBehavior component_snap;
|
60
|
+
|
61
|
+
/**
|
62
|
+
Whether the component creates an opening when placed on a surface, e.g. a window frame component.
|
63
|
+
*/
|
64
|
+
bool component_cuts_opening;
|
65
|
+
|
66
|
+
/**
|
67
|
+
Whether the component visually revolves around its Z axes to have its X-Z plane face the camera.
|
68
|
+
*/
|
69
|
+
bool component_always_face_camera;
|
70
|
+
|
71
|
+
/**
|
72
|
+
Whether the component always casts a shadow as if it were facing the direction of the sun.
|
73
|
+
*/
|
74
|
+
bool component_shadows_face_sun;
|
75
|
+
|
76
|
+
/**
|
77
|
+
Bitmask where set bits indicate which scale tool handles are hidden on a given component:
|
78
|
+
|
79
|
+
- Bit0: disable scale along X axis,
|
80
|
+
- Bit1: disable scale along Y axis,
|
81
|
+
- Bit2: disable scale along Z axis,
|
82
|
+
- Bit3: disable scale in X-Z plane,
|
83
|
+
- Bit4: disable scale in Y-Z plane,
|
84
|
+
- Bit5: disable scale in X-Y plane,
|
85
|
+
- Bit6: disable scale uniform (XYZ)
|
86
|
+
|
87
|
+
Prior to SketchUp 2018, API 6.0 this field existed but was never used.
|
88
|
+
*/
|
89
|
+
size_t component_no_scale_mask;
|
90
|
+
};
|
91
|
+
|
92
|
+
/**
|
93
|
+
@enum SUComponentType
|
94
|
+
@brief Indicates the type of the component.
|
95
|
+
*/
|
96
|
+
enum SUComponentType {
|
97
|
+
SUComponentType_Normal, ///< Regular component definition
|
98
|
+
SUComponentType_Group, ///< Group definition
|
99
|
+
SUComponentType_Image ///< Image definition. (Added SketchUp 2022, API 10.0)
|
100
|
+
};
|
101
|
+
|
102
|
+
/**
|
103
|
+
@brief Converts from an \ref SUComponentDefinitionRef to an \ref SUEntityRef.
|
104
|
+
This is essentially an upcast operation.
|
105
|
+
@param[in] comp_def The given component definition reference.
|
106
|
+
@related SUComponentDefinitionRef
|
107
|
+
@return
|
108
|
+
- The converted \ref SUEntityRef if comp_def is a valid component
|
109
|
+
- If not, the returned reference will be invalid
|
110
|
+
*/
|
111
|
+
SU_EXPORT SUEntityRef SUComponentDefinitionToEntity(SUComponentDefinitionRef comp_def);
|
112
|
+
|
113
|
+
/**
|
114
|
+
@brief Converts from an \ref SUEntityRef to an \ref SUComponentDefinitionRef.
|
115
|
+
This is essentially a downcast operation so the given entity must be
|
116
|
+
convertible to an \ref SUComponentDefinitionRef.
|
117
|
+
@param[in] entity The given entity reference.
|
118
|
+
@related SUComponentDefinitionRef
|
119
|
+
@return
|
120
|
+
- The converted \ref SUComponentDefinitionRef if the downcast operation succeeds
|
121
|
+
- If not, the returned reference will be invalid
|
122
|
+
*/
|
123
|
+
SU_EXPORT SUComponentDefinitionRef SUComponentDefinitionFromEntity(SUEntityRef entity);
|
124
|
+
|
125
|
+
/**
|
126
|
+
@brief Converts from an \ref SUComponentDefinitionRef to an \ref
|
127
|
+
SUDrawingElementRef. This is essentially an upcast operation.
|
128
|
+
@param[in] comp_def The given component definition reference.
|
129
|
+
@related SUComponentDefinitionRef
|
130
|
+
@return
|
131
|
+
- The converted \ref SUEntityRef if comp_def is a valid component
|
132
|
+
- If not, the returned reference will be invalid
|
133
|
+
*/
|
134
|
+
SU_EXPORT SUDrawingElementRef
|
135
|
+
SUComponentDefinitionToDrawingElement(SUComponentDefinitionRef comp_def);
|
136
|
+
|
137
|
+
/**
|
138
|
+
@brief Converts from an \ref SUDrawingElementRef to an \ref
|
139
|
+
SUComponentDefinitionRef. This is essentially a downcast operation so the
|
140
|
+
given element must be convertible to an \ref SUComponentDefinitionRef.
|
141
|
+
@param[in] drawing_elem The given element reference.
|
142
|
+
@related SUComponentDefinitionRef
|
143
|
+
@return
|
144
|
+
- The converted \ref SUComponentDefinitionRef if the downcast operation succeeds
|
145
|
+
- If not, the returned reference will be invalid
|
146
|
+
*/
|
147
|
+
SU_EXPORT SUComponentDefinitionRef
|
148
|
+
SUComponentDefinitionFromDrawingElement(SUDrawingElementRef drawing_elem);
|
149
|
+
|
150
|
+
/**
|
151
|
+
@brief Creates a new component definition. The created definition must be
|
152
|
+
released with SUComponentDefinitionRelease(), or attached to either
|
153
|
+
a parent component or parent model. Add the new component definition to
|
154
|
+
model using SUModelAddComponentDefinitions() before making any
|
155
|
+
modifications to it. Once the component definition is owned by a model,
|
156
|
+
use SUModelRemoveComponentDefinitions() to remove it.
|
157
|
+
@param[out] comp_def The component object created.
|
158
|
+
@related SUComponentDefinitionRef
|
159
|
+
@return
|
160
|
+
- \ref SU_ERROR_NONE on success
|
161
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if comp_def is NULL
|
162
|
+
*/
|
163
|
+
SU_RESULT SUComponentDefinitionCreate(SUComponentDefinitionRef* comp_def);
|
164
|
+
|
165
|
+
/**
|
166
|
+
@brief Releases a component definition object and its associated resources. If
|
167
|
+
the provided definition was contained by a model, use
|
168
|
+
SUModelRemoveComponentDefinitions() to remove the definition and all
|
169
|
+
instances.
|
170
|
+
@param[in] comp_def The component definition object.
|
171
|
+
@related SUComponentDefinitionRef
|
172
|
+
@return
|
173
|
+
- \ref SU_ERROR_NONE on success
|
174
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if comp_def is NULL
|
175
|
+
- \ref SU_ERROR_INVALID_OUTPUT if comp_def points to an invalid object
|
176
|
+
*/
|
177
|
+
SU_RESULT SUComponentDefinitionRelease(SUComponentDefinitionRef* comp_def);
|
178
|
+
|
179
|
+
/**
|
180
|
+
@brief Retrieves the name of a component definition.
|
181
|
+
@param[in] comp_def The component definition object.
|
182
|
+
@param[out] name The name retrieved.
|
183
|
+
@related SUComponentDefinitionRef
|
184
|
+
@return
|
185
|
+
- \ref SU_ERROR_NONE on success
|
186
|
+
- \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
|
187
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if name is NULL
|
188
|
+
- \ref SU_ERROR_INVALID_OUTPUT if name does not point to a valid \ref
|
189
|
+
SUStringRef object
|
190
|
+
*/
|
191
|
+
SU_RESULT SUComponentDefinitionGetName(SUComponentDefinitionRef comp_def, SUStringRef* name);
|
192
|
+
|
193
|
+
/**
|
194
|
+
@brief Sets the name of a component definition.
|
195
|
+
|
196
|
+
@bug Before SketchUp 2022.0.1 (API 10.0) this would not ensure the definition name was unique.
|
197
|
+
As of SketchUp 2022.0.1 the component will be given a unique name automatically if needed.
|
198
|
+
|
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.
|
203
|
+
@related SUComponentDefinitionRef
|
204
|
+
@return
|
205
|
+
- \ref SU_ERROR_NONE on success
|
206
|
+
- \ref SU_ERROR_INVALID_INPUT if \p comp_def is invalid
|
207
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if \p name is NULL
|
208
|
+
*/
|
209
|
+
SU_RESULT SUComponentDefinitionSetName(SUComponentDefinitionRef comp_def, const char* name);
|
210
|
+
|
211
|
+
/**
|
212
|
+
@brief Retrieves the globally unique identifier (guid) string of a component
|
213
|
+
definition.
|
214
|
+
|
215
|
+
@since SketchUp 2015, API 3.0
|
216
|
+
|
217
|
+
@see SUModelGetGuid
|
218
|
+
@see SUSkpReadGuid
|
219
|
+
|
220
|
+
@param[in] comp_def The component definition object.
|
221
|
+
@param[out] guid_ref The guid retrieved.
|
222
|
+
@related SUComponentDefinitionRef
|
223
|
+
@return
|
224
|
+
- \ref SU_ERROR_NONE on success
|
225
|
+
- \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
|
226
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if guid is NULL
|
227
|
+
- \ref SU_ERROR_INVALID_OUTPUT if guid does not point to a valid \ref
|
228
|
+
SUStringRef object
|
229
|
+
*/
|
230
|
+
SU_RESULT SUComponentDefinitionGetGuid(SUComponentDefinitionRef comp_def, SUStringRef* guid_ref);
|
231
|
+
|
232
|
+
/**
|
233
|
+
@brief Retrieves the entities of the component definition.
|
234
|
+
@param[in] comp_def The component definition object.
|
235
|
+
@param[out] entities The entities retrieved.
|
236
|
+
@related SUComponentDefinitionRef
|
237
|
+
@return
|
238
|
+
- \ref SU_ERROR_NONE on success
|
239
|
+
- \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
|
240
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if entities is NULL
|
241
|
+
*/
|
242
|
+
SU_RESULT SUComponentDefinitionGetEntities(
|
243
|
+
SUComponentDefinitionRef comp_def, SUEntitiesRef* entities);
|
244
|
+
|
245
|
+
/**
|
246
|
+
@brief Retrieves the description of the component definition.
|
247
|
+
@param[in] comp_def The component definition object.
|
248
|
+
@param[out] desc The description retrieved.
|
249
|
+
@related SUComponentDefinitionRef
|
250
|
+
@return
|
251
|
+
- \ref SU_ERROR_NONE on success
|
252
|
+
- \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
|
253
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if desc is NULL
|
254
|
+
- \ref SU_ERROR_INVALID_OUTPUT if desc does not point to a valid \ref
|
255
|
+
SUStringRef object
|
256
|
+
*/
|
257
|
+
SU_RESULT SUComponentDefinitionGetDescription(SUComponentDefinitionRef comp_def, SUStringRef* desc);
|
258
|
+
|
259
|
+
/**
|
260
|
+
@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.
|
263
|
+
@related SUComponentDefinitionRef
|
264
|
+
@return
|
265
|
+
- \ref SU_ERROR_NONE on success
|
266
|
+
- \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
|
267
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if desc is NULL
|
268
|
+
*/
|
269
|
+
SU_RESULT SUComponentDefinitionSetDescription(SUComponentDefinitionRef comp_def, const char* desc);
|
270
|
+
|
271
|
+
/**
|
272
|
+
@brief Create an instance of a component definition.
|
273
|
+
|
274
|
+
@warning Breaking Change: The behavior of this method was changed in
|
275
|
+
SketchUp 2018, API 6.0. In previous releases there was a
|
276
|
+
recommendation to not release an instance created with this method if
|
277
|
+
it was associated with a parent using SUEntitiesAddInstance(). The
|
278
|
+
limitation was removed by generalizing SUComponentInstanceRelease()
|
279
|
+
to correctly release instances whether or not they are contained in a
|
280
|
+
parent component.
|
281
|
+
|
282
|
+
@related SUComponentDefinitionRef
|
283
|
+
@param[in] comp_def The component definition object.
|
284
|
+
@param[out] instance The instance created.
|
285
|
+
@return
|
286
|
+
- \ref SU_ERROR_NONE on success
|
287
|
+
- \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
|
288
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if instance is NULL
|
289
|
+
- \ref SU_ERROR_GENERIC if comp_def is not the definition of a type that can
|
290
|
+
be instantiated
|
291
|
+
*/
|
292
|
+
SU_RESULT SUComponentDefinitionCreateInstance(
|
293
|
+
SUComponentDefinitionRef comp_def, SUComponentInstanceRef* instance);
|
294
|
+
|
295
|
+
/**
|
296
|
+
@brief Retrieves the total number of instances of the provided definition.
|
297
|
+
This method takes into account the full hierarchy of the model.
|
298
|
+
Therefore, the count is influenced by adding/removing instances of other
|
299
|
+
definitions which contain an instance of this definition. Users should
|
300
|
+
not use this function to determine the count to be passed to \ref
|
301
|
+
SUComponentDefinitionGetInstances specifying the number of instances to
|
302
|
+
be retrieved.
|
303
|
+
@since SketchUp 2017, API 5.0
|
304
|
+
@param[in] comp_def The component definition object.
|
305
|
+
@param[out] count The number of instances of the definition.
|
306
|
+
@related SUComponentDefinitionRef
|
307
|
+
@return
|
308
|
+
- \ref SU_ERROR_NONE on success
|
309
|
+
- \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
|
310
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
|
311
|
+
*/
|
312
|
+
SU_RESULT SUComponentDefinitionGetNumUsedInstances(
|
313
|
+
SUComponentDefinitionRef comp_def, size_t* count);
|
314
|
+
|
315
|
+
/**
|
316
|
+
@brief Retrieves the number of unique instances of the provided definition. The
|
317
|
+
returned count represents the number of instances of this definition in
|
318
|
+
the model's root plus the number instances of this definition contained
|
319
|
+
in other definitions.
|
320
|
+
@since SketchUp 2017, API 5.0
|
321
|
+
@param[in] comp_def The component definition object.
|
322
|
+
@param[out] count The number of instances of the definition.
|
323
|
+
@related SUComponentDefinitionRef
|
324
|
+
@return
|
325
|
+
- \ref SU_ERROR_NONE on success
|
326
|
+
- \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
|
327
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
|
328
|
+
*/
|
329
|
+
SU_RESULT SUComponentDefinitionGetNumInstances(SUComponentDefinitionRef comp_def, size_t* count);
|
330
|
+
|
331
|
+
/**
|
332
|
+
@brief Retrieves the instances of the definition.
|
333
|
+
@since SketchUp 2017, API 5.0
|
334
|
+
@param[in] comp_def The component definition object.
|
335
|
+
@param[in] len The number of component instances to retrieve.
|
336
|
+
@param[out] instances The component instances retrieved.
|
337
|
+
@param[out] count The number of component instances retrieved.
|
338
|
+
@related SUComponentDefinitionRef
|
339
|
+
@return
|
340
|
+
- \ref SU_ERROR_NONE on success
|
341
|
+
- \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
|
342
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if instances or count is NULL
|
343
|
+
*/
|
344
|
+
SU_RESULT SUComponentDefinitionGetInstances(
|
345
|
+
SUComponentDefinitionRef comp_def, size_t len, SUComponentInstanceRef instances[],
|
346
|
+
size_t* count);
|
347
|
+
|
348
|
+
/**
|
349
|
+
@brief Retrieves the behavior of a component definition.
|
350
|
+
@param[in] comp_def The component definition object.
|
351
|
+
@param[out] behavior The behavior retrieved.
|
352
|
+
@related SUComponentDefinitionRef
|
353
|
+
@return
|
354
|
+
- \ref SU_ERROR_NONE on success
|
355
|
+
- \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
|
356
|
+
*/
|
357
|
+
SU_RESULT SUComponentDefinitionGetBehavior(
|
358
|
+
SUComponentDefinitionRef comp_def, struct SUComponentBehavior* behavior);
|
359
|
+
|
360
|
+
/**
|
361
|
+
@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.
|
364
|
+
@related SUComponentDefinitionRef
|
365
|
+
@return
|
366
|
+
- \ref SU_ERROR_NONE on success
|
367
|
+
- \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
|
368
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if behavior is NULL
|
369
|
+
*/
|
370
|
+
SU_RESULT SUComponentDefinitionSetBehavior(
|
371
|
+
SUComponentDefinitionRef comp_def, const struct SUComponentBehavior* behavior);
|
372
|
+
|
373
|
+
/**
|
374
|
+
@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.
|
378
|
+
@related SUComponentDefinitionRef
|
379
|
+
@return
|
380
|
+
- \ref SU_ERROR_NONE on success
|
381
|
+
- \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
|
382
|
+
- \ref SU_ERROR_INVALID_INPUT if schema_ref is not a valid object
|
383
|
+
- \ref SU_ERROR_INVALID_INPUT if schema_type_ref is not a valid object
|
384
|
+
*/
|
385
|
+
SU_RESULT SUComponentDefinitionApplySchemaType(
|
386
|
+
SUComponentDefinitionRef comp_def, SUSchemaRef schema_ref, SUSchemaTypeRef schema_type_ref);
|
387
|
+
|
388
|
+
/**
|
389
|
+
@brief Retrieves a flag indicating whether the component definition was created
|
390
|
+
inside the current SketchUp model or whether it was added from another
|
391
|
+
SKP file.
|
392
|
+
@since SketchUp 2016, API 4.0
|
393
|
+
@param[in] comp_def The component definition object.
|
394
|
+
@param[out] is_internal The bool value retrieved.
|
395
|
+
@related SUComponentDefinitionRef
|
396
|
+
@return
|
397
|
+
- \ref SU_ERROR_NONE on success
|
398
|
+
- \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
|
399
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if is_internal is NULL
|
400
|
+
*/
|
401
|
+
SU_RESULT SUComponentDefinitionIsInternal(SUComponentDefinitionRef comp_def, bool* is_internal);
|
402
|
+
|
403
|
+
/**
|
404
|
+
@brief Retrieves the path where the component definition was loaded from.
|
405
|
+
@since SketchUp 2016, API 4.0
|
406
|
+
@param[in] comp_def The component definition object.
|
407
|
+
@param[out] path A valid path if successful.
|
408
|
+
@related SUComponentDefinitionRef
|
409
|
+
@return
|
410
|
+
- \ref SU_ERROR_NONE on success
|
411
|
+
- \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
|
412
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if path is NULL
|
413
|
+
- \ref SU_ERROR_INVALID_OUTPUT if path does not point to a valid \ref
|
414
|
+
SUStringRef object
|
415
|
+
*/
|
416
|
+
SU_RESULT SUComponentDefinitionGetPath(SUComponentDefinitionRef comp_def, SUStringRef* path);
|
417
|
+
|
418
|
+
/**
|
419
|
+
@brief Gets the load time of the component definition. For an internal component
|
420
|
+
definition, this is the time that it was created. For an external
|
421
|
+
component definition, this is the time that it was added to the model.
|
422
|
+
@since SketchUp 2016, API 4.0
|
423
|
+
@param[in] comp_def The component definition object.
|
424
|
+
@param[out] load_time The time value retrieved.
|
425
|
+
@related SUComponentDefinitionRef
|
426
|
+
@return
|
427
|
+
- \ref SU_ERROR_NONE on success
|
428
|
+
- \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
|
429
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if load_time is NULL
|
430
|
+
*/
|
431
|
+
SU_RESULT SUComponentDefinitionGetLoadTime(SUComponentDefinitionRef comp_def, struct tm* load_time);
|
432
|
+
|
433
|
+
/**
|
434
|
+
@brief Retrieves the number of openings from the component definition.
|
435
|
+
@since SketchUp 2016, API 4.0
|
436
|
+
@param[in] comp_def The component definition object.
|
437
|
+
@param[out] count The number of openings.
|
438
|
+
@related SUComponentDefinitionRef
|
439
|
+
@return
|
440
|
+
- \ref SU_ERROR_NONE on success
|
441
|
+
- \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
|
442
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
|
443
|
+
*/
|
444
|
+
SU_RESULT SUComponentDefinitionGetNumOpenings(SUComponentDefinitionRef comp_def, size_t* count);
|
445
|
+
|
446
|
+
/**
|
447
|
+
@brief Retrieves the openings from the component definition. The openings
|
448
|
+
retrieved must be released with SUOpeningRelease().
|
449
|
+
@since SketchUp 2016, API 4.0
|
450
|
+
@param[in] comp_def The component definition object.
|
451
|
+
@param[in] len The number of openings to retrieve.
|
452
|
+
@param[out] openings The \ref SUOpeningRef objects retrieved.
|
453
|
+
@param[out] count The number of openings retrieved.
|
454
|
+
@related SUComponentDefinitionRef
|
455
|
+
@return
|
456
|
+
- \ref SU_ERROR_NONE on success
|
457
|
+
- \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
|
458
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if openings or count is NULL
|
459
|
+
*/
|
460
|
+
SU_RESULT SUComponentDefinitionGetOpenings(
|
461
|
+
SUComponentDefinitionRef comp_def, size_t len, SUOpeningRef openings[], size_t* count);
|
462
|
+
|
463
|
+
/**
|
464
|
+
@brief Retrieves the insertion point from the component definition.
|
465
|
+
@since SketchUp 2016, API 4.0
|
466
|
+
@param[in] comp_def The component definition object.
|
467
|
+
@param[out] point The insertion point retrieved.
|
468
|
+
@related SUComponentDefinitionRef
|
469
|
+
@return
|
470
|
+
- \ref SU_ERROR_NONE on success
|
471
|
+
- \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
|
472
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if point is NULL
|
473
|
+
*/
|
474
|
+
SU_RESULT SUComponentDefinitionGetInsertPoint(
|
475
|
+
SUComponentDefinitionRef comp_def, struct SUPoint3D* point);
|
476
|
+
|
477
|
+
/**
|
478
|
+
@brief Retrieves the \ref SUComponentType() from the component definition.
|
479
|
+
@note This function didn't recognize Image type definitions until SketchUp 2022.2, API 10.0.
|
480
|
+
@since SketchUp 2016, API 4.0
|
481
|
+
@param[in] comp_def The component definition object.
|
482
|
+
@param[out] type The \ref SUComponentType() retrieved.
|
483
|
+
@related SUComponentDefinitionRef
|
484
|
+
@return
|
485
|
+
- \ref SU_ERROR_NONE on success
|
486
|
+
- \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
|
487
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if type is NULL
|
488
|
+
*/
|
489
|
+
SU_RESULT SUComponentDefinitionGetType(
|
490
|
+
SUComponentDefinitionRef comp_def, enum SUComponentType* type);
|
491
|
+
|
492
|
+
/**
|
493
|
+
@brief Updates the faces in the component definition so that they are oriented
|
494
|
+
consistently.
|
495
|
+
@since SketchUp 2016, API 4.0
|
496
|
+
@param[in] comp_def The component definition object.
|
497
|
+
@related SUComponentDefinitionRef
|
498
|
+
@return
|
499
|
+
- \ref SU_ERROR_NONE on success
|
500
|
+
- \ref SU_ERROR_INVALID_INPUT if comp_def is invalid
|
501
|
+
*/
|
502
|
+
SU_RESULT SUComponentDefinitionOrientFacesConsistently(SUComponentDefinitionRef comp_def);
|
503
|
+
|
504
|
+
/**
|
505
|
+
@brief Sets the insertion point for the component definition.
|
506
|
+
@since SketchUp 2016, API 4.0
|
507
|
+
|
508
|
+
@deprecated As of SketchUp 2020.0 the insertion point cannot be changed.
|
509
|
+
This function is now a NOOP.
|
510
|
+
|
511
|
+
@warning Breaking Change: The behavior of this method was changed in
|
512
|
+
SketchUp 2018, API 6.0. In previous releases if the second argument was
|
513
|
+
null this method returned \ref SU_ERROR_NULL_POINTER_OUTPUT, but this
|
514
|
+
was changed to \ref SU_ERROR_NULL_POINTER_INPUT for consistency with
|
515
|
+
other API methods.
|
516
|
+
|
517
|
+
@param[in] comp_def The component definition object.
|
518
|
+
@param[in] point The \ref SUPoint3D to use.
|
519
|
+
@related SUComponentDefinitionRef
|
520
|
+
@return
|
521
|
+
- \ref SU_ERROR_NONE
|
522
|
+
*/
|
523
|
+
SU_DEPRECATED_FUNCTION("SketchUp API 8.0")
|
524
|
+
SU_RESULT SUComponentDefinitionSetInsertPoint(
|
525
|
+
SUComponentDefinitionRef comp_def, const struct SUPoint3D* point);
|
526
|
+
|
527
|
+
/**
|
528
|
+
@brief Sets the axes of the component definition.
|
529
|
+
@since SketchUp 2016, API 4.0
|
530
|
+
@param[in] comp_def The component definition object.
|
531
|
+
@param[in] axes The \ref SUAxesRef to use.
|
532
|
+
@related SUComponentDefinitionRef
|
533
|
+
@return
|
534
|
+
- \ref SU_ERROR_NONE on success
|
535
|
+
- \ref SU_ERROR_INVALID_INPUT if comp_def or axes are invalid
|
536
|
+
*/
|
537
|
+
SU_RESULT SUComponentDefinitionSetAxes(SUComponentDefinitionRef comp_def, SUAxesRef axes);
|
538
|
+
|
539
|
+
/**
|
540
|
+
@brief Retrieves a flag indicating whether the component definition is a Live
|
541
|
+
Component or a sub-definition of a Live Component.
|
542
|
+
|
543
|
+
@note These components are parametrically generated and API users should not
|
544
|
+
modify them.
|
545
|
+
|
546
|
+
@since SketchUp 2021.0, API9.0
|
547
|
+
|
548
|
+
@param[in] comp_def The component definition object.
|
549
|
+
@param[out] is_live The bool value retrieved.
|
550
|
+
@related SUComponentDefinitionRef
|
551
|
+
@return
|
552
|
+
- \ref SU_ERROR_NONE on success
|
553
|
+
- \ref SU_ERROR_INVALID_INPUT if \p comp_def is invalid
|
554
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p is_live is NULL
|
555
|
+
*/
|
556
|
+
SU_RESULT SUComponentDefinitionIsLiveComponent(SUComponentDefinitionRef comp_def, bool* is_live);
|
557
|
+
|
558
|
+
/**
|
559
|
+
@brief Saves the component definition to a file.
|
560
|
+
@since SketchUp 2022.0, API 10.0
|
561
|
+
@param[in] comp_def The component definition object.
|
562
|
+
@param[in] file_path The file path destination of the serialization operation.
|
563
|
+
Assumed to be UTF-8 encoded.
|
564
|
+
@param[in] version The SKP file format version to use when saving.
|
565
|
+
Use \ref SUModelVersion_Current for the current version.
|
566
|
+
@related SUComponentDefinitionRef
|
567
|
+
@return
|
568
|
+
- \ref SU_ERROR_NONE on success
|
569
|
+
- \ref SU_ERROR_INVALID_INPUT if \p comp_def is not a valid object
|
570
|
+
- \ref SU_ERROR_INVALID_ARGUMENT if \p comp_def is not owned by a model
|
571
|
+
- \ref SU_ERROR_MODEL_VERSION if \p version is invalid
|
572
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if \p file_path is NULL
|
573
|
+
- \ref SU_ERROR_SERIALIZATION if the serialization operation itself fails
|
574
|
+
*/
|
575
|
+
SU_RESULT SUComponentDefinitionSaveToFile(
|
576
|
+
SUComponentDefinitionRef comp_def, const char* file_path, enum SUModelVersion version);
|
577
|
+
|
578
|
+
#ifdef __cplusplus
|
579
|
+
} // extern "C"
|
580
|
+
#endif
|
581
|
+
|
582
|
+
#if defined(__APPLE__)
|
583
|
+
#pragma GCC diagnostic pop
|
584
|
+
#endif
|
585
|
+
|
586
|
+
#pragma pack(pop)
|
587
|
+
|
588
|
+
#endif // SKETCHUP_MODEL_COMPONENT_DEFINITION_H_
|