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,49 @@
|
|
1
|
+
// Copyright 2021 Trimble Inc. All Rights Reserved.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Type for SketchUp model file version.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_MODEL_MODEL_VERSION_H_
|
8
|
+
#define SKETCHUP_MODEL_MODEL_VERSION_H_
|
9
|
+
|
10
|
+
#pragma pack(push, 8)
|
11
|
+
|
12
|
+
#ifdef __cplusplus
|
13
|
+
extern "C" {
|
14
|
+
#endif
|
15
|
+
|
16
|
+
/**
|
17
|
+
@enum SUModelVersion
|
18
|
+
@brief SketchUp model file format version
|
19
|
+
@since SketchUp 2014, API 2.0
|
20
|
+
@note Starting with SketchUp 2021, SketchUp is using a the same file format across versions.
|
21
|
+
For instance, SketchUp 2021 can open a file made in SketchUp 2022.
|
22
|
+
*/
|
23
|
+
enum SUModelVersion {
|
24
|
+
SUModelVersion_SU3, ///< SketchUp 3
|
25
|
+
SUModelVersion_SU4, ///< SketchUp 4
|
26
|
+
SUModelVersion_SU5, ///< SketchUp 5
|
27
|
+
SUModelVersion_SU6, ///< SketchUp 6
|
28
|
+
SUModelVersion_SU7, ///< SketchUp 7
|
29
|
+
SUModelVersion_SU8, ///< SketchUp 8
|
30
|
+
SUModelVersion_SU2013, ///< SketchUp 2013
|
31
|
+
SUModelVersion_SU2014, ///< SketchUp 2014
|
32
|
+
SUModelVersion_SU2015, ///< SketchUp 2015
|
33
|
+
SUModelVersion_SU2016, ///< SketchUp 2016
|
34
|
+
SUModelVersion_SU2017, ///< SketchUp 2017
|
35
|
+
SUModelVersion_SU2018, ///< SketchUp 2018
|
36
|
+
SUModelVersion_SU2019, ///< SketchUp 2019
|
37
|
+
SUModelVersion_SU2020, ///< SketchUp 2020
|
38
|
+
SUModelVersion_SU2021, ///< "Versionless" file format. Starting with SketchUp 2021.
|
39
|
+
SUModelVersion_Current = SUModelVersion_SU2021 ///< The most current version supported.
|
40
|
+
///< Added in SketchUp 2022, API 10.0.
|
41
|
+
};
|
42
|
+
|
43
|
+
#ifdef __cplusplus
|
44
|
+
} // extern "C"
|
45
|
+
#endif
|
46
|
+
|
47
|
+
#pragma pack(pop)
|
48
|
+
|
49
|
+
#endif // SKETCHUP_MODEL_MODEL_VERSION_H_
|
@@ -0,0 +1,72 @@
|
|
1
|
+
// Copyright 2013 Trimble Inc. All Rights Reserved.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUOpeningRef.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_MODEL_OPENING_H_
|
8
|
+
#define SKETCHUP_MODEL_OPENING_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/common.h>
|
11
|
+
#include <SketchUpAPI/geometry.h>
|
12
|
+
#include <SketchUpAPI/model/defs.h>
|
13
|
+
#include <SketchUpAPI/model/component_instance.h>
|
14
|
+
|
15
|
+
#ifdef __cplusplus
|
16
|
+
extern "C" {
|
17
|
+
#endif
|
18
|
+
|
19
|
+
/**
|
20
|
+
@struct SUOpeningRef
|
21
|
+
@brief References an opening object, which is a hole in a face created by an
|
22
|
+
attached component instance or group.
|
23
|
+
@since SketchUp 2014, API 2.0
|
24
|
+
|
25
|
+
*/
|
26
|
+
|
27
|
+
/**
|
28
|
+
@brief Retrieves the number of points of an opening.
|
29
|
+
@since SketchUp 2014, API 2.0
|
30
|
+
@param[in] opening The opening object.
|
31
|
+
@param[out] count The number of points.
|
32
|
+
@related SUOpeningRef
|
33
|
+
@return
|
34
|
+
- \ref SU_ERROR_NONE on success
|
35
|
+
- \ref SU_ERROR_INVALID_INPUT if opening is not a valid object
|
36
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
|
37
|
+
*/
|
38
|
+
SU_RESULT SUOpeningGetNumPoints(SUOpeningRef opening, size_t* count);
|
39
|
+
|
40
|
+
/**
|
41
|
+
@brief Retrieves the points of an opening object.
|
42
|
+
@since SketchUp 2014, API 2.0
|
43
|
+
@param[in] opening The opening object.
|
44
|
+
@param[in] len The number of points to retrieve.
|
45
|
+
@param[out] points The points retrieved.
|
46
|
+
@param[out] count The number of points retrieved.
|
47
|
+
@related SUOpeningRef
|
48
|
+
@return
|
49
|
+
- \ref SU_ERROR_NONE on success
|
50
|
+
- \ref SU_ERROR_INVALID_INPUT if opening is not a valid object
|
51
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if points or count is NULL
|
52
|
+
*/
|
53
|
+
SU_RESULT SUOpeningGetPoints(
|
54
|
+
SUOpeningRef opening, size_t len, struct SUPoint3D points[], size_t* count);
|
55
|
+
|
56
|
+
/**
|
57
|
+
@brief Release an opening object.
|
58
|
+
@since SketchUp 2014, API 2.0
|
59
|
+
@param[in] opening The opening object.
|
60
|
+
@related SUOpeningRef
|
61
|
+
@return
|
62
|
+
- \ref SU_ERROR_NONE on success
|
63
|
+
- \ref SU_ERROR_INVALID_INPUT if opening is not a valid object
|
64
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if points or count is NULL
|
65
|
+
*/
|
66
|
+
SU_RESULT SUOpeningRelease(SUOpeningRef* opening);
|
67
|
+
|
68
|
+
#ifdef __cplusplus
|
69
|
+
} // extern "C" {
|
70
|
+
#endif
|
71
|
+
|
72
|
+
#endif // SKETCHUP_MODEL_OPENING_H_
|
@@ -0,0 +1,79 @@
|
|
1
|
+
// Copyright 2013 Trimble Inc. All Rights Reserved
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUOptionsManagerRef.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_MODEL_OPTIONS_MANAGER_H_
|
8
|
+
#define SKETCHUP_MODEL_OPTIONS_MANAGER_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/common.h>
|
11
|
+
#include <SketchUpAPI/unicodestring.h>
|
12
|
+
#include <SketchUpAPI/model/defs.h>
|
13
|
+
|
14
|
+
#ifdef __cplusplus
|
15
|
+
extern "C" {
|
16
|
+
#endif
|
17
|
+
|
18
|
+
/**
|
19
|
+
@struct SUOptionsManagerRef
|
20
|
+
@brief Provides access to the different options provider objects in the model.
|
21
|
+
Available options providers are: PageOptions, SlideshowOptions,
|
22
|
+
UnitsOptions and PrintOptions.
|
23
|
+
*/
|
24
|
+
|
25
|
+
/**
|
26
|
+
@brief Gets the number of available options providers.
|
27
|
+
@param[in] options_manager The options manager object.
|
28
|
+
@param[out] count The number of options available.
|
29
|
+
@related SUOptionsManagerRef
|
30
|
+
@return
|
31
|
+
- \ref SU_ERROR_NONE on success
|
32
|
+
- \ref SU_ERROR_INVALID_INPUT if options_manager is not valid
|
33
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
|
34
|
+
*/
|
35
|
+
SU_RESULT SUOptionsManagerGetNumOptionsProviders(
|
36
|
+
SUOptionsManagerRef options_manager, size_t* count);
|
37
|
+
|
38
|
+
/**
|
39
|
+
@brief Retrieves options providers associated with the options manager.
|
40
|
+
@param[in] options_manager The options manager object.
|
41
|
+
@param[in] len The number of options provider names
|
42
|
+
to retrieve.
|
43
|
+
@param[out] options_provider_names The options provider names retrieved.
|
44
|
+
@param[out] count The number of options provider names
|
45
|
+
retrieved.
|
46
|
+
@related SUOptionsManagerRef
|
47
|
+
@return
|
48
|
+
- \ref SU_ERROR_NONE on success
|
49
|
+
- \ref SU_ERROR_INVALID_INPUT if options_manager is not a valid object
|
50
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if options_providers or count is NULL
|
51
|
+
- \ref SU_ERROR_INVALID_OUTPUT if any of the strings in options_provider_names
|
52
|
+
are invalid
|
53
|
+
*/
|
54
|
+
SU_RESULT SUOptionsManagerGetOptionsProviderNames(
|
55
|
+
SUOptionsManagerRef options_manager, size_t len, SUStringRef options_provider_names[],
|
56
|
+
size_t* count);
|
57
|
+
|
58
|
+
/**
|
59
|
+
@brief Retrieves the options provider given a name.
|
60
|
+
@param[in] options_manager The options manager object.
|
61
|
+
@param[in] name The name of the options provider object to get.
|
62
|
+
Assumed to be UTF-8 encoded.
|
63
|
+
@param[out] options_provider The options_provider object retrieved.
|
64
|
+
@related SUOptionsManagerRef
|
65
|
+
@return
|
66
|
+
- \ref SU_ERROR_NONE on success
|
67
|
+
- \ref SU_ERROR_INVALID_INPUT if options_manager is not a valid object
|
68
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if name is NULL
|
69
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if options_providers is NULL
|
70
|
+
- \ref SU_ERROR_NO_DATA if the requested options provider object does not exist
|
71
|
+
*/
|
72
|
+
SU_RESULT SUOptionsManagerGetOptionsProviderByName(
|
73
|
+
SUOptionsManagerRef options_manager, const char* name, SUOptionsProviderRef* options_provider);
|
74
|
+
|
75
|
+
#ifdef __cplusplus
|
76
|
+
} // extern "C" {
|
77
|
+
#endif
|
78
|
+
|
79
|
+
#endif // SKETCHUP_MODEL_OPTIONS_MANAGER_H_
|
@@ -0,0 +1,166 @@
|
|
1
|
+
// Copyright 2013-2019 Trimble Inc. All Rights Reserved
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUOptionsProviderRef.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_MODEL_OPTIONS_PROVIDER_H_
|
8
|
+
#define SKETCHUP_MODEL_OPTIONS_PROVIDER_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/common.h>
|
11
|
+
#include <SketchUpAPI/unicodestring.h>
|
12
|
+
#include <SketchUpAPI/model/defs.h>
|
13
|
+
|
14
|
+
#ifdef __cplusplus
|
15
|
+
extern "C" {
|
16
|
+
#endif
|
17
|
+
|
18
|
+
/**
|
19
|
+
@struct SUOptionsProviderRef
|
20
|
+
@brief Provides ability to get and set options on an options provider object.
|
21
|
+
Available options providers are: PageOptions, SlideshowOptions,
|
22
|
+
UnitsOptions and PrintOptions.
|
23
|
+
*/
|
24
|
+
|
25
|
+
/**
|
26
|
+
@brief Gets the number of available option keys.
|
27
|
+
@param[in] options_provider The options provider object.
|
28
|
+
@param[out] count The number of keys available.
|
29
|
+
@related SUOptionsProviderRef
|
30
|
+
@return
|
31
|
+
- \ref SU_ERROR_NONE on success
|
32
|
+
- \ref SU_ERROR_INVALID_INPUT if options_provider is not valid
|
33
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
|
34
|
+
*/
|
35
|
+
SU_RESULT SUOptionsProviderGetNumKeys(SUOptionsProviderRef options_provider, size_t* count);
|
36
|
+
|
37
|
+
/**
|
38
|
+
@brief Retrieves options providers associated with the options manager.
|
39
|
+
@param[in] options_provider The options provider object.
|
40
|
+
@param[in] len The number of keys to retrieve.
|
41
|
+
@param[out] keys The keys retrieved.
|
42
|
+
@param[out] count The number of keys retrieved.
|
43
|
+
@related SUOptionsProviderRef
|
44
|
+
@return
|
45
|
+
- \ref SU_ERROR_NONE on success
|
46
|
+
- \ref SU_ERROR_INVALID_INPUT if options_provider is not a valid object
|
47
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if keys or count is NULL
|
48
|
+
- \ref SU_ERROR_INVALID_OUTPUT if any of the strings in the keys array are
|
49
|
+
invalid.
|
50
|
+
*/
|
51
|
+
SU_RESULT SUOptionsProviderGetKeys(
|
52
|
+
SUOptionsProviderRef options_provider, size_t len, SUStringRef keys[], size_t* count);
|
53
|
+
|
54
|
+
// clang-format off
|
55
|
+
/**
|
56
|
+
@brief Gets the value of the given option.
|
57
|
+
@param[in] options_provider The options provider object.
|
58
|
+
@param[in] key The key that indicates which option to get.
|
59
|
+
@param[out] value The value to get the current option setting.
|
60
|
+
@related SUOptionsProviderRef
|
61
|
+
@return
|
62
|
+
- \ref SU_ERROR_NONE on success
|
63
|
+
- \ref SU_ERROR_INVALID_INPUT if options_provider is not valid
|
64
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if key is NULL
|
65
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if value is NULL
|
66
|
+
- \ref SU_ERROR_INVALID_OUTPUT if value is invalid
|
67
|
+
|
68
|
+
The breakdown of options and value types for each options provider is shown
|
69
|
+
in the table below.
|
70
|
+
|
71
|
+
Options Provider | Option | Value Type | Meaning
|
72
|
+
---------------- | -------------------- | ----------------------- | -------
|
73
|
+
NamedOptions | | | (SketchUp 2022.0, API 10.0) Removed from API
|
74
|
+
PageOptions | | | Options for the Scene
|
75
|
+
| ShowTransition | SUTypedValueType_Bool | Show scene transitions
|
76
|
+
| TransitionTime | SUTypedValueType_Double | Number of seconds between each scene transition
|
77
|
+
SlideshowOptions | | | Options for the slideshow
|
78
|
+
| LoopSlideshow | SUTypedValueType_Bool | Causes the slideshow to loop
|
79
|
+
| SlideTime | SUTypedValueType_Double | Number of seconds that each slide is shown
|
80
|
+
UnitsOptions | | | Options for units display in the model
|
81
|
+
| LengthPrecision | SUTypedValueType_Int32 | Number of decimal places of precision shown for length
|
82
|
+
| LengthFormat | SUTypedValueType_Int32 | Default units format for the model
|
83
|
+
| LengthUnit | SUTypedValueType_Int32 | Units format for the model
|
84
|
+
| LengthSnapEnabled | SUTypedValueType_Bool | Indicates whether length snapping is enabled
|
85
|
+
| LengthSnapLength | SUTypedValueType_Double | Controls the snapping length size increment
|
86
|
+
| AreaPrecision | SUTypedValueType_Int32 | (SketchUp 2020.0, API Version 8.0) Number of decimal places of precision shown for area units
|
87
|
+
| AreaUnit | SUTypedValueType_Int32 | (SketchUp 2019.2, API Version 7.1) Area units format for the model
|
88
|
+
| VolumePrecision | SUTypedValueType_Int32 | (SketchUp 2020.0, API Version 8.0) Number of decimal places of precision shown for volume units
|
89
|
+
| VolumeUnit | SUTypedValueType_Int32 | (SketchUp 2019.2, API Version 7.1) Volume units format for the model
|
90
|
+
| AnglePrecision | SUTypedValueType_Int32 | Number of decimal places of precision shown for angles
|
91
|
+
| AngleSnapEnabled | SUTypedValueType_Bool | Indicates whether angle snapping is enabled
|
92
|
+
| SnapAngle | SUTypedValueType_Double | Controls the angle snapping size increment
|
93
|
+
| SuppressUnitsDisplay | SUTypedValueType_Bool | Display the units format if LengthFormat is Decimal or Fractional
|
94
|
+
| ForceInchDisplay | SUTypedValueType_Bool | Force displaying 0" if LengthFormat is Architectural
|
95
|
+
|
96
|
+
Some of the options map to enumerated values, as shown in the table below.
|
97
|
+
|
98
|
+
Option | Value | Meaning
|
99
|
+
------------ | ----- | -------
|
100
|
+
LengthFormat | 0: | Decimal
|
101
|
+
| 1: | Architectural
|
102
|
+
| 2: | Engineering
|
103
|
+
| 3: | Fractional
|
104
|
+
LengthUnit | 0: | Inches
|
105
|
+
| 1: | Feet
|
106
|
+
| 2: | Millimeter
|
107
|
+
| 3: | Centimeter
|
108
|
+
| 4: | Meter
|
109
|
+
| 5: | Yard
|
110
|
+
AreaUnit | 0: | Square Inches
|
111
|
+
| 1: | Square Feet
|
112
|
+
| 2: | Square Millimeter
|
113
|
+
| 3: | Square Centimeter
|
114
|
+
| 4: | Square Meter
|
115
|
+
| 5: | Square Yard
|
116
|
+
VolumeUnit | 0: | Cubic Inches
|
117
|
+
| 1: | Cubic Feet
|
118
|
+
| 2: | Cubic Millimeter
|
119
|
+
| 3: | Cubic Centimeter
|
120
|
+
| 4: | Cubic Meter
|
121
|
+
| 5: | Cubic Yard
|
122
|
+
| 6: | Liter
|
123
|
+
| 7: | US Gallon
|
124
|
+
|
125
|
+
Note that LengthUnit will be overridden by LengthFormat if LengthFormat is not
|
126
|
+
set to Decimal. Architectural defaults to inches, Engineering defaults to feet,
|
127
|
+
and Fractional defaults to inches.
|
128
|
+
*/
|
129
|
+
// clang-format
|
130
|
+
SU_RESULT SUOptionsProviderGetValue(
|
131
|
+
SUOptionsProviderRef options_provider, const char* key, SUTypedValueRef* value);
|
132
|
+
|
133
|
+
/**
|
134
|
+
@brief Sets the value of the given option.
|
135
|
+
@param[in] options_provider The options provider object.
|
136
|
+
@param[in] key The key that indicates which option to set.
|
137
|
+
@param[in] value The value to set the option to.
|
138
|
+
@related SUOptionsProviderRef
|
139
|
+
@return
|
140
|
+
- \ref SU_ERROR_NONE on success
|
141
|
+
- \ref SU_ERROR_INVALID_INPUT if options_provider or value is not valid
|
142
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if key is NULL
|
143
|
+
*/
|
144
|
+
SU_RESULT SUOptionsProviderSetValue(
|
145
|
+
SUOptionsProviderRef options_provider, const char* key, SUTypedValueRef value);
|
146
|
+
|
147
|
+
/**
|
148
|
+
@brief Retrieves the name of the options provider.
|
149
|
+
@since SketchUp 2016, API 4.0
|
150
|
+
@param[in] options_provider The options provider object.
|
151
|
+
@param[out] name The name retrieved.
|
152
|
+
@related SUOptionsProviderRef
|
153
|
+
@return
|
154
|
+
- \ref SU_ERROR_NONE on success
|
155
|
+
- \ref SU_ERROR_INVALID_INPUT if options_provider or value is not valid
|
156
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if name is NULL
|
157
|
+
- \ref SU_ERROR_INVALID_OUTPUT if name does not point to a valid \ref
|
158
|
+
SUStringRef object
|
159
|
+
*/
|
160
|
+
SU_RESULT SUOptionsProviderGetName(SUOptionsProviderRef options_provider, SUStringRef* name);
|
161
|
+
|
162
|
+
#ifdef __cplusplus
|
163
|
+
} // extern "C" {
|
164
|
+
#endif
|
165
|
+
|
166
|
+
#endif // SKETCHUP_MODEL_OPTIONS_PROVIDER_H_
|
@@ -0,0 +1,140 @@
|
|
1
|
+
// Copyright 2013 Trimble Inc. All Rights Reserved.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUPolyline3dRef.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_MODEL_POLYLINE3D_H_
|
8
|
+
#define SKETCHUP_MODEL_POLYLINE3D_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/common.h>
|
11
|
+
#include <SketchUpAPI/geometry.h>
|
12
|
+
#include <SketchUpAPI/model/defs.h>
|
13
|
+
|
14
|
+
#ifdef __cplusplus
|
15
|
+
extern "C" {
|
16
|
+
#endif
|
17
|
+
|
18
|
+
/**
|
19
|
+
@struct SUPolyline3dRef
|
20
|
+
@extends SUEntityRef
|
21
|
+
@brief A polyline3d object. These are curve-like entities that do not
|
22
|
+
generate inference snaps or affect geometry in any way.
|
23
|
+
*/
|
24
|
+
|
25
|
+
/**
|
26
|
+
@brief Converts from an \ref SUPolyline3dRef to an \ref SUEntityRef. This is
|
27
|
+
essentially an upcast operation.
|
28
|
+
@param[in] line The polyline3d object.
|
29
|
+
@related SUPolyline3dRef
|
30
|
+
@return
|
31
|
+
- The converted \ref SUEntityRef if line is a valid object. If not, the returned
|
32
|
+
reference will be invalid.
|
33
|
+
*/
|
34
|
+
SU_EXPORT SUEntityRef SUPolyline3dToEntity(SUPolyline3dRef line);
|
35
|
+
|
36
|
+
/**
|
37
|
+
@brief Converts from an \ref SUEntityRef to an \ref SUPolyline3dRef. This is
|
38
|
+
essentially a downcast operation so the given entity must be convertible
|
39
|
+
to an \ref SUPolyline3dRef.
|
40
|
+
@param[in] entity The given entity reference.
|
41
|
+
@related SUPolyline3dRef
|
42
|
+
@return
|
43
|
+
- The converted \ref SUPolyline3dRef if the downcast operation succeeds. If not,
|
44
|
+
the returned reference will be invalid.
|
45
|
+
*/
|
46
|
+
SU_EXPORT SUPolyline3dRef SUPolyline3dFromEntity(SUEntityRef entity);
|
47
|
+
|
48
|
+
/**
|
49
|
+
@brief Converts from an \ref SUPolyline3dRef to an \ref SUDrawingElementRef.
|
50
|
+
This is essentially an upcast operation.
|
51
|
+
@param[in] line The polyline3d object.
|
52
|
+
@related SUPolyline3dRef
|
53
|
+
@return
|
54
|
+
- The converted \ref SUEntityRef if line is a valid object. If not, the returned
|
55
|
+
reference will be invalid.
|
56
|
+
*/
|
57
|
+
SU_EXPORT SUDrawingElementRef SUPolyline3dToDrawingElement(SUPolyline3dRef line);
|
58
|
+
|
59
|
+
/**
|
60
|
+
@brief Converts from an \ref SUDrawingElementRef to an \ref SUPolyline3dRef.
|
61
|
+
This is essentially a downcast operation so the given element must be
|
62
|
+
convertible to an \ref SUPolyline3dRef.
|
63
|
+
@param[in] drawing_elem The drawing element object.
|
64
|
+
@related SUPolyline3dRef
|
65
|
+
@return
|
66
|
+
- The converted \ref SUPolyline3dRef if the downcast operation succeeds. If not,
|
67
|
+
the returned reference will be invalid.
|
68
|
+
*/
|
69
|
+
SU_EXPORT SUPolyline3dRef SUPolyline3dFromDrawingElement(SUDrawingElementRef drawing_elem);
|
70
|
+
|
71
|
+
/**
|
72
|
+
@brief Creates a new polyline3d object. The polyline3d object must be
|
73
|
+
subsequently deallocated with \ref SUPolyline3dRelease() unless it is
|
74
|
+
associated with a parent object.
|
75
|
+
@param[out] polyline The polyline3d object.
|
76
|
+
@related SUPolyline3dRef
|
77
|
+
@return
|
78
|
+
- \ref SU_ERROR_NONE on success
|
79
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if polyline is NULL
|
80
|
+
*/
|
81
|
+
SU_RESULT SUPolyline3dCreate(SUPolyline3dRef* polyline);
|
82
|
+
|
83
|
+
/**
|
84
|
+
@brief Releases a new polyline3d object. The polyline3d object must not be
|
85
|
+
associated with a parent object.
|
86
|
+
@param[in] polyline The polyline3d object.
|
87
|
+
@related SUPolyline3dRef
|
88
|
+
@return
|
89
|
+
- \ref SU_ERROR_NONE on success
|
90
|
+
- \ref SU_ERROR_INVALID_INPUT if polyline does not reference a valid object
|
91
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if polyline is NULL
|
92
|
+
*/
|
93
|
+
SU_RESULT SUPolyline3dRelease(SUPolyline3dRef* polyline);
|
94
|
+
|
95
|
+
/**
|
96
|
+
@brief Adds points to a polyline3d object.
|
97
|
+
@param[in] polyline The polyline3d object.
|
98
|
+
@param[in] num_points Number of points being added.
|
99
|
+
@param[in] points Array of points to add.
|
100
|
+
@related SUPolyline3dRef
|
101
|
+
@return
|
102
|
+
- \ref SU_ERROR_NONE on success
|
103
|
+
- \ref SU_ERROR_INVALID_INPUT if polyline is not a valid object
|
104
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if points is NULL
|
105
|
+
*/
|
106
|
+
SU_RESULT SUPolyline3dAddPoints(
|
107
|
+
SUPolyline3dRef polyline, size_t num_points, struct SUPoint3D points[]);
|
108
|
+
|
109
|
+
/**
|
110
|
+
@brief Retrieves the number of points contained by a polyline3d.
|
111
|
+
@param[in] line The polyline3d object.
|
112
|
+
@param[out] count The number of points available.
|
113
|
+
@related SUPolyline3dRef
|
114
|
+
@return
|
115
|
+
- \ref SU_ERROR_NONE on success
|
116
|
+
- \ref SU_ERROR_INVALID_INPUT if line is an invalid object
|
117
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
|
118
|
+
*/
|
119
|
+
SU_RESULT SUPolyline3dGetNumPoints(SUPolyline3dRef line, size_t* count);
|
120
|
+
|
121
|
+
/**
|
122
|
+
@brief Retrieves the points in the polyline3d object.
|
123
|
+
@param[in] line The polyline3d object.
|
124
|
+
@param[in] len The maximum number of points to retrieve.
|
125
|
+
@param[out] points The points retrieved.
|
126
|
+
@param[out] count The number of points retrieved.
|
127
|
+
@related SUPolyline3dRef
|
128
|
+
@return
|
129
|
+
- \ref SU_ERROR_NONE on success
|
130
|
+
- \ref SU_ERROR_INVALID_INPUT if line is an invalid object
|
131
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if points or count is NULL
|
132
|
+
*/
|
133
|
+
SU_RESULT SUPolyline3dGetPoints(
|
134
|
+
SUPolyline3dRef line, size_t len, struct SUPoint3D points[], size_t* count);
|
135
|
+
|
136
|
+
#ifdef __cplusplus
|
137
|
+
} // extern "C"
|
138
|
+
#endif
|
139
|
+
|
140
|
+
#endif // SKETCHUP_MODEL_POLYLINE3D_H_
|
@@ -0,0 +1,179 @@
|
|
1
|
+
// Copyright 2013 Trimble Inc. All rights reserved.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SURenderingOptionsRef.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_MODEL_RENDERING_OPTIONS_H_
|
8
|
+
#define SKETCHUP_MODEL_RENDERING_OPTIONS_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/color.h>
|
11
|
+
#include <SketchUpAPI/common.h>
|
12
|
+
#include <SketchUpAPI/unicodestring.h>
|
13
|
+
#include <SketchUpAPI/model/defs.h>
|
14
|
+
|
15
|
+
#ifdef __cplusplus
|
16
|
+
extern "C" {
|
17
|
+
#endif
|
18
|
+
|
19
|
+
/**
|
20
|
+
@struct SURenderingOptionsRef
|
21
|
+
@brief Used to get and set values in a rendering options object.
|
22
|
+
*/
|
23
|
+
|
24
|
+
/**
|
25
|
+
@brief Gets the number of available rendering options keys.
|
26
|
+
@since SketchUp 2017, API 5.0
|
27
|
+
@param[in] rendering_options The rendering options object.
|
28
|
+
@param[out] count The number of keys available.
|
29
|
+
@related SURenderingOptionsRef
|
30
|
+
@return
|
31
|
+
- \ref SU_ERROR_NONE on success
|
32
|
+
- \ref SU_ERROR_INVALID_INPUT if rendering_options is not valid
|
33
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
|
34
|
+
*/
|
35
|
+
SU_RESULT SURenderingOptionsGetNumKeys(SURenderingOptionsRef rendering_options, size_t* count);
|
36
|
+
|
37
|
+
/**
|
38
|
+
@brief Retrieves keys associated with the rendering options object.
|
39
|
+
@since SketchUp 2017, API 5.0
|
40
|
+
@param[in] rendering_options The rendering options object.
|
41
|
+
@param[in] len The number of keys to retrieve.
|
42
|
+
@param[out] keys The keys retrieved.
|
43
|
+
@param[out] count The number of keys retrieved.
|
44
|
+
@related SURenderingOptionsRef
|
45
|
+
@return
|
46
|
+
- \ref SU_ERROR_NONE on success
|
47
|
+
- \ref SU_ERROR_INVALID_INPUT if rendering_options is not a valid object
|
48
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if keys or count is NULL
|
49
|
+
- \ref SU_ERROR_INVALID_OUTPUT if any of the strings in the keys array are
|
50
|
+
invalid.
|
51
|
+
*/
|
52
|
+
SU_RESULT SURenderingOptionsGetKeys(
|
53
|
+
SURenderingOptionsRef rendering_options, size_t len, SUStringRef keys[], size_t* count);
|
54
|
+
|
55
|
+
/**
|
56
|
+
@brief Sets values in a rendering options object.
|
57
|
+
@param[in] rendering_options The rendering options object.
|
58
|
+
@param[in] key The key. Assumed to be UTF-8 encoded.
|
59
|
+
@param[in] value_in The value used to set the option.
|
60
|
+
@related SURenderingOptionsRef
|
61
|
+
@return
|
62
|
+
- \ref SU_ERROR_NONE on success
|
63
|
+
- \ref SU_ERROR_INVALID_INPUT if rendering_options or value_in is an invalid
|
64
|
+
object
|
65
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if key is NULL
|
66
|
+
*/
|
67
|
+
SU_RESULT SURenderingOptionsSetValue(
|
68
|
+
SURenderingOptionsRef rendering_options, const char* key, SUTypedValueRef value_in);
|
69
|
+
|
70
|
+
/**
|
71
|
+
@brief Retrieves the value of a given rendering option.
|
72
|
+
@param[in] rendering_options The rendering options object.
|
73
|
+
@param[in] key The key. Assumed to be UTF-8 encoded.
|
74
|
+
@param[out] value_out The value retrieved.
|
75
|
+
@related SURenderingOptionsRef
|
76
|
+
@return
|
77
|
+
- \ref SU_ERROR_NONE on success
|
78
|
+
- \ref SU_ERROR_INVALID_INPUT if rendering_options is an invalid object
|
79
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if key is NULL
|
80
|
+
- \ref SU_ERROR_INVALID_OUTPUT if value_out is an invalid object
|
81
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if value_out is NULL
|
82
|
+
|
83
|
+
The breakdown of rendering options and value types is shown in the table below.
|
84
|
+
|
85
|
+
Rendering Option | Value Type
|
86
|
+
------------------------ | ----------------------
|
87
|
+
BackgroundColor | SUTypedValueType_Color
|
88
|
+
BandColor | SUTypedValueType_Color
|
89
|
+
ConstructionColor | SUTypedValueType_Color
|
90
|
+
DepthQueWidth | SUTypedValueType_Int32
|
91
|
+
DisplayColorByLayer | SUTypedValueType_Bool
|
92
|
+
DisplayDims | SUTypedValueType_Bool
|
93
|
+
DisplayFog | SUTypedValueType_Bool
|
94
|
+
DisplayInstanceAxes | SUTypedValueType_Bool
|
95
|
+
DisplaySectionPlanes (since SketchUp 2014, API 2.0) | SUTypedValueType_Bool
|
96
|
+
DisplaySectionCuts (since SketchUp 2015, API 3.0) | SUTypedValueType_Bool
|
97
|
+
DisplaySketchAxes | SUTypedValueType_Bool
|
98
|
+
DisplayText | SUTypedValueType_Bool
|
99
|
+
DisplayWatermarks | SUTypedValueType_Bool
|
100
|
+
DrawBackEdges (since SketchUp 2015, API 3.0) | SUTypedValueType_Bool
|
101
|
+
DrawDepthQue | SUTypedValueType_Bool
|
102
|
+
DrawGround | SUTypedValueType_Bool
|
103
|
+
DrawHidden | SUTypedValueType_Bool
|
104
|
+
DrawHiddenGeometry (since SketchUp 2020, API 8.0) | SUTypedValueType_Bool
|
105
|
+
DrawHiddenObjects (since SketchUp 2020, API 8.0) | SUTypedValueType_Bool
|
106
|
+
DrawHorizon | SUTypedValueType_Bool
|
107
|
+
DrawLineEnds | SUTypedValueType_Bool
|
108
|
+
DrawProfilesOnly | SUTypedValueType_Bool
|
109
|
+
DrawSilhouettes | SUTypedValueType_Bool
|
110
|
+
DrawUnderground | SUTypedValueType_Bool
|
111
|
+
EdgeColorMode | SUTypedValueType_Int32
|
112
|
+
EdgeDisplayMode | SUTypedValueType_Int32
|
113
|
+
EdgeType | SUTypedValueType_Int32
|
114
|
+
ExtendLines | SUTypedValueType_Bool
|
115
|
+
FaceBackColor | SUTypedValueType_Color
|
116
|
+
FaceFrontColor | SUTypedValueType_Color
|
117
|
+
FogColor | SUTypedValueType_Color
|
118
|
+
FogEndDist | SUTypedValueType_Double
|
119
|
+
FogStartDist | SUTypedValueType_Double
|
120
|
+
FogUseBkColor | SUTypedValueType_Bool
|
121
|
+
ForegroundColor | SUTypedValueType_Color
|
122
|
+
GroundColor | SUTypedValueType_Color
|
123
|
+
GroundTransparency | SUTypedValueType_Int32
|
124
|
+
HideConstructionGeometry | SUTypedValueType_Bool
|
125
|
+
HighlightColor | SUTypedValueType_Color
|
126
|
+
HorizonColor | SUTypedValueType_Color
|
127
|
+
InactiveFade | SUTypedValueType_Double
|
128
|
+
InactiveHidden | SUTypedValueType_Bool
|
129
|
+
InstanceFade | SUTypedValueType_Double
|
130
|
+
InstanceHidden | SUTypedValueType_Bool
|
131
|
+
JitterEdges | SUTypedValueType_Bool
|
132
|
+
LineEndWidth | SUTypedValueType_Int32
|
133
|
+
LineExtension | SUTypedValueType_Int32
|
134
|
+
LockedColor | SUTypedValueType_Color
|
135
|
+
MaterialTransparency | SUTypedValueType_Bool
|
136
|
+
ModelTransparency | SUTypedValueType_Bool
|
137
|
+
RenderMode | SUTypedValueType_Int32
|
138
|
+
SectionActiveColor | SUTypedValueType_Color
|
139
|
+
SectionCutDrawEdges (since SketchUp 2015, API 3.0) | SUTypedValueType_Bool
|
140
|
+
SectionCutFilled (since SketchUp 2018, API 6.0) | SUTypedValueType_Bool
|
141
|
+
SectionCutWidth | SUTypedValueType_Int32
|
142
|
+
SectionDefaultCutColor | SUTypedValueType_Color
|
143
|
+
SectionDefaultFillColor (since SketchUp 2018, API 6.0) | SUTypedValueType_Color
|
144
|
+
SectionInactiveColor | SUTypedValueType_Color
|
145
|
+
ShowViewName | SUTypedValueType_Bool
|
146
|
+
SilhouetteWidth | SUTypedValueType_Int32
|
147
|
+
SkyColor | SUTypedValueType_Color
|
148
|
+
Texture | SUTypedValueType_Bool
|
149
|
+
TransparencySort | SUTypedValueType_Int32
|
150
|
+
|
151
|
+
Some of the options map to enumerated values, as shown in the table below.
|
152
|
+
|
153
|
+
Option | Value | Meaning
|
154
|
+
--------------- | ----- | -------
|
155
|
+
EdgeColorMode | 0: | ObjectColor
|
156
|
+
| 1: | ForegroundColor
|
157
|
+
| 2: | DirectionColor
|
158
|
+
EdgeDisplayMode | 0: | EdgeDisplayNone
|
159
|
+
| 1: | EdgeDisplayAll
|
160
|
+
| 2: | EdgeDisplayStandalone
|
161
|
+
RenderMode | 0: | RenderWireframe
|
162
|
+
| 1: | RenderHidden
|
163
|
+
| 2: | RenderFlat
|
164
|
+
| 3: | RenderSmooth
|
165
|
+
| 4: | RenderTextureObsolete
|
166
|
+
| 5: | RenderNoMaterials
|
167
|
+
EdgeType | 0: | EdgeStandard
|
168
|
+
| 1: | EdgeNPR
|
169
|
+
|
170
|
+
@note The rendering option FaceColorMode was removed in SketchUp 2019.1.
|
171
|
+
*/
|
172
|
+
SU_RESULT SURenderingOptionsGetValue(
|
173
|
+
SURenderingOptionsRef rendering_options, const char* key, SUTypedValueRef* value_out);
|
174
|
+
|
175
|
+
#ifdef __cplusplus
|
176
|
+
}
|
177
|
+
#endif
|
178
|
+
|
179
|
+
#endif // SKETCHUP_MODEL_RENDERING_OPTIONS_H_
|