BHoM/Robot_Toolkit

DOFType: FixedPositive/FixedNegative for Translation in Constrain6DOF Not Working

dextertuay99 opened this issue · 3 comments

keyword: BHoM, Robot, Panel, Edges, Support

Description:
I would like to assign at the same time, both:

  • Rigid Support with either +ve/-ve uplift
  • Elastic Support with elastic coef.

However, I notice there's no difference between DOFType FixedPositive/FixedNegative

Steps to reproduce:

  • DOFType: FixedPositive
  • Constrain6DOF: TranslationX
  • Edge: Support
  • Edges: Curve <- ExternalEdges <- Object (pull from Robot)
  • Panel: externalEdges
  • Push (to robot): object

Expected behaviour:
I'm expecting for both:

  • Rigid Support with either +ve/-ve uplift
  • Elastic Support with elastic coef.

Any help?

Hi @dextertuay99, I believe it is because DOFType.FixedPositive and DOFType.FixedNegative are not currently implemented within the Robot_Toolkit - hence why they are coming back as DOFType.Free when you push them in to Robot:

public static void ToRobot(IRobotNodeSupportData suppData, Constraint6DOF constraint)
{
suppData.UX = constraint.TranslationX == DOFType.Fixed ? 1 : 0;
suppData.UY = constraint.TranslationY == DOFType.Fixed ? 1 : 0;
suppData.UZ = constraint.TranslationZ == DOFType.Fixed ? 1 : 0;
suppData.RX = constraint.RotationX == DOFType.Fixed ? 1 : 0;
suppData.RY = constraint.RotationY == DOFType.Fixed ? 1 : 0;
suppData.RZ = constraint.RotationZ == DOFType.Fixed ? 1 : 0;
suppData.KX = constraint.TranslationalStiffnessX;
suppData.KY = constraint.TranslationalStiffnessY;
suppData.KZ = constraint.TranslationalStiffnessZ;
suppData.HX = constraint.RotationalStiffnessX;
suppData.HY = constraint.RotationalStiffnessY;
suppData.HZ = constraint.RotationalStiffnessZ;
}

The current implementation supports DOFType Fixed, Free and Spring.

Do you have any experience using Robot API? If this is a bug you could write a fix for, I would be happy to assist and review.

@dextertuay99 will be something along the lines of this:
suppData.SetOneDir(IRobotNodeSupportFixingDirection.I_NSFD_UZ, IRobotNodeSupportOneDirectionFixingType.I_NSODFT_PLUS);