Why does this debug work before opFillet, but not after?

joshtargo
joshtargo Member Posts: 679 EDU

Do a lot of these geo ops completely rebuild bodies from surfaces, wiping out their old references?

I am having the same issue when I set variables equal to some sequence of queries based on "face" and then try to reference them after the op. same thing seems to happen with opFaceBlend and opFullWrapFillet

https://cad.onshape.com/documents/dc6b225d58f50a6952c6e8c7/w/f639f3061244afb786989d45/e/eb3bc965048d026635d38804

when debug is before the op:

image.png

when debug is after the op:

image.png

Answers

  • Konst_Sh
    Konst_Sh Member Posts: 170 PRO

    transient queries of geometry are not guaranteed to stay relevant through any context changing operations. you can try using makeRobustQuery, startTracking or using positional queries like qOwnedByBody(EntityType.FACE)→qGeometry(GeometryType.PLANE)→qCoincidesWithPlane(facePlane)

    CADSharp - Onshape custom programming services + Onshape mechanical design services

  • joshtargo
    joshtargo Member Posts: 679 EDU

    @Konst_Sh even the body gets lost. I have my FS working now, but never ran into these before.