SketchUp / api-issue-tracker

Public issue tracker for the SketchUp and LayOut's APIs
https://developer.sketchup.com/
38 stars 10 forks source link

Q: SUTypedValueType enumeration members #562

Open DanRathbun opened 4 years ago

DanRathbun commented 4 years ago

SketchUp C API Question

The SUTypedValueType enumeration has SUTypedValueType_Vector3D, but not a member for Vector2D, Point2D, Point3D, UVQ, etc.

Q: Why not ?

thomthom commented 4 years ago

Different answers per type here:

sketchup[bot] commented 2 years ago

Logged as: SKEXT-3514

sketchup[bot] commented 2 years ago

Logged as: SKEXT-3515

DanRathbun commented 1 year ago

Just a note here that SketchUp does have screen space coordinates (Point2d) and 2D bounds (Bounds2d) which would be helpful when drawing to the view and keeping track of stuff so drawn.

It may be that in the future when Issue 653 : Implement SUViewDraw is implemented for Live C API use, using the aforementioned types for screen space locating arguments will be helpful.

thomthom commented 1 year ago

I just found out that SUTypedValueRef generalize point3d and vector3d and unitvector3d, returning SUTypedValueType_Vector3D for all these types.

For more details: https://github.com/SketchUp/api-issue-tracker/issues/868

DanRathbun commented 1 year ago

Backstory: What prompted finding out about this was the challenge of how a Ruby extension would pass points and vectors to the Live C API and receive these back from the Live C API.

I already guessed that the passing would likely be done with arrays of 3 doubles. I'm thinking this would be a very good subexample for the Live C API examples repository.