Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DynamicType() does not seem to return correct type #122

Open
mwintzer opened this issue Sep 13, 2023 · 0 comments
Open

DynamicType() does not seem to return correct type #122

mwintzer opened this issue Sep 13, 2023 · 0 comments

Comments

@mwintzer
Copy link

I'm currently working through the canonical "Bottle" exercise as I try to teach myself OCP. I'm stumped at this step, where it appears like the DynamicType() method does not return the expected value:

faceexplorer = TopExp_Explorer(mybody2, TopAbs_FACE)
while faceexplorer.More():
    aface = TopoDS.TopoDS.Face_s(faceexplorer.Current())
    asurface = BRep_Tool.Surface_s(aface)
    # print(asurface.DynamicType().IsInstance(Geom_Plane.get_type_descriptor_s()))
    if asurface.DynamicType().IsInstance(Geom_Plane(0,0,0,0).DynamicType()):
        print("boo!")
    faceexplorer.Next()

I expect the Type to be reported as a Geom_Plane, but the DynamicType() method always return Standard_Type. I'm not approaching this in the way the OCCT docs describe, but for the life of my I could not find the equivalent to the STANDARD_TYPE() macro in the OCP stubs.

Would really appreciate any guidance (whether this is really an issue or if simply PEBKAC). Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant