api-issue-tracker
api-issue-tracker copied to clipboard
Predefined Geometric Helper Constants
SketchUp & LayOut C API Parity Feature Request
The Ruby API has predefined Geometric helper objects referenced by constants ...
# Ruby API used for SketchUp models ...
ORIGIN # a Point3d
X_AXIS # a Vector3d
Y_AXIS # a Vector3d
Z_AXIS # a Vector3d
IDENTITY # a (3D) identity transformation
# Ruby API used for LayOut documents ...
ORIGIN_2D # a Point2d
X_AXIS_2D # a Vector2d
Y_AXIS_2D # a Vector2d
IDENTITY_2D # an identity Transformation2d
... these are not yet defined in the C APIs.
// Geometry Constants : "geometry_constants.h"
// Should (in the future) be included by: "geometry.h"
#ifndef GEOMETRY_CONSTANTS_H_
#define GEOMETRY_CONSTANTS_H_
// SKETCHUP
const struct SUPoint3D SU_ORIGIN = { 0.0, 0.0, 0.0 };
const struct SUVector3D SU_X_AXIS = { 1.0, 0.0, 0.0 };
const struct SUVector3D SU_Y_AXIS = { 0.0, 1.0, 0.0 };
const struct SUVector3D SU_Z_AXIS = { 0.0, 0.0, 1.0 };
const struct SUTransformation SU_IDENTITY = {
1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0
};
// LAYOUT
const struct SUPoint2D LO_ORIGIN = { 0.0, 0.0 };
const struct SUVector2D LO_X_AXIS = { 1.0, 0.0 };
const struct SUVector2D LO_Y_AXIS = { 0.0, 1.0 };
const struct SUTransformation2D LO_IDENTITY = {
1.0, 0.0, 0.0,
0.0, 1.0, 0.0
};
#endif // GEOMETRY_CONSTANTS_H_
@thomthom I edited the above example, adding #define include protection so coders can add it as a separate file "geometry_constants.h" to their projects and it can also be later added to the API.
AND ... it's been 4 months and this still hasn't been logged ?
Feature requests are treated differently from bug reports. They usually require some more up-front work and investigation. We automate bug reports as they are usually very clear in what course of action and often higher priority since they affected released functionality.
ping @ackarkka Your thoughts?