0

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?

Malinko
  • 124
  • 11

1 Answers1

1

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());
Vladimir Perković
  • 1,351
  • 3
  • 12
  • 30
  • How about when using `SelectPointsObjectModel3d` (only available from HOperSet) It returns HTuple, How can I `WriteObjectModel3d` this? – Malinko Jun 05 '23 at 10:26
  • SelectPointsObjectModel3d is available from both HOperatorSet and object oriented C# (you can see that in documentation - there are 5 different tabs). But if you still want you can use HOperatorSet.WriteObjectModel3d() and use the tuple as a first variable. – Vladimir Perković Jun 05 '23 at 14:04
  • I got it from the docu and tried it but It didnt work, my mistake was that even from reading in the om3 I got a HTuple instead of ObjMod3D, didnt expect that. But thank you for clearing up the `WriteObjectModel3d` that really helped. – Malinko Jun 06 '23 at 08:02