Circle geometry from /partstudios/d/{did}/{wvm}/{wvmid}/e/{eid}/features does not match definition

roth_vann
roth_vann Member Posts: 5 ✭
According to the schema I should expect xCenter and yCenter to appear in the geometry definition but I am only seeing radius. Is there way to query the center too?
This is what I see in the entity 
{
            "btType":"BTMSketchCurve-4",
            "geometry":{
               "btType":"BTCurveGeometryCircle-115",
               "radius":0.02504807710647583,
               "clockwise":false
            },
            "centerId":"zVVB6lg0iq2O.center",
            "internalIds":[
               
            ],
            "isConstruction":false,
            "isFromSplineHandle":false,
            "isFromSplineControlPolygon":false,
            "isFromEndpointSplineHandle":false,
            "parameters":[
               
            ],
            "namespace":"",
            "nodeId":"MUVCHpUnkKfqVdvS2",
            "entityId":"zVVB6lg0iq2O"

Answers

  • Caden_Armstrong
    Caden_Armstrong Member Posts: 472 PRO
    How are you running your API request?

    I just ran against a sample that I have, and I am seeing a different output for a circle in a sketch.
    I have an xCenter, yCenter, xDir, yDir parameters.

    if you are doing 
    /api/v6/....
    try without the /v6 (or whetever api version you are calling)
    www.smartbenchsoftware.com --- Renaissance --- Kestrel -- SmartLink
    Experts in Onshape Automation - Custom Features and Integrated Applications
  • roth_vann
    roth_vann Member Posts: 5 ✭
    How are you running your API request?

    I just ran against a sample that I have, and I am seeing a different output for a circle in a sketch.
    I have an xCenter, yCenter, xDir, yDir parameters.

    if you are doing 
    /api/v6/....
    try without the /v6 (or whetever api version you are calling)
    I did some testing and this problem only occurs in /v6. It'd be simple for me to swap versions but there are some other differences in the format that makes v6 easier to use (like with geometryIds).

    I'm wondering if this issue is intended or a small bug since the rest of the schemas have been accurate so far.  
  • Caden_Armstrong
    Caden_Armstrong Member Posts: 472 PRO
    I am guessing this is a small bug, those parameters should probably be there. Bit hard to define a circle without a center...
    www.smartbenchsoftware.com --- Renaissance --- Kestrel -- SmartLink
    Experts in Onshape Automation - Custom Features and Integrated Applications