简体   繁体   中英

Why do some HalconDotNet procedures produce HTuple instead of preferred type?

One example is: HOperatorSet.RigidTransObjectModel3d()

It expects HTuple but also accept objectModel3D as model input. The model output is HTuple , even tho it should (imo) be objectModel3D, as a result I cannot use the objectModel3D's WriteObjectModel3d() functionality.

Is there a way around this this so I end up with an objectModel3D ?

You don't need to use HOperatorSet, it can be done directly from HObjectModel3D:

        HObjectModel3D hObjectModel3D = new HObjectModel3D(HTuple.TupleRand(10), HTuple.TupleRand(10), HTuple.TupleRand(10));

        HPose hPose = new HPose(0.0, 0.0, 0.0, 90.0, 90.0, 90.0, "Rp+T", "gba", "point");
        HObjectModel3D objectModel3DRig = hObjectModel3D.RigidTransObjectModel3d(hPose);
        objectModel3DRig.WriteObjectModel3d("om3", @"C:\temp\temp2.om3", new HTuple(), new HTuple());

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM