CAD-Assistant - Solids location changes after rotation

Hi,

I'm trying to do rotation on top level / root labels of step file and got some strange behavior of CAD Assistant.
When selecting root compound with 2 shapes and rotaing it the 2 compounds seem to set their world space to localspace and snap back to identity.
I did a small gif to show what I mean and also attached the step file (made with freecad).
I'm also having trouble setting the TopLoc_Location after rotation of root labels. Is this in general a bug? I wanted to file a bug report on Mantis but it keeps telling me that my account is disabled or that my username/password is wrong but it is fine!

This is my (partial and pseudo) code:

void rotate(gp_Ax1 axis, double degree) {
  aShapeTool = XCAFDoc_DocumentTool::ShapeTool(m_Document
  TDF_LabelSequence rootLabels;
  aShapeTool->GetFreeShapes(rootLabels);
  for (int i = 0; i < rootLabels.Length();i++) {
    TDF_Label l = rootLabels.Value(i);
    TopLoc_Location loc = XCAFDoc_ShapeTool::GetLocation(GetLabel());
    gp_Trsf orient;
    orient.SetRotation(axis, degree);
    gp_Trsf result(loc.Transformation().Multiplied(orient));
    XCAFDoc_Location::Set(l, TopLoc_Location(result));
  }
}

Thanks for any help!

Best regards
-Michael

Michael Maenz's picture

The line

TopLoc_Location loc = XCAFDoc_ShapeTool::GetLocation(GetLabel());

should be

TopLoc_Location loc = XCAFDoc_ShapeTool::GetLocation(l);
Kirill Gavrilov's picture

Hello Michael, as for CAD Assistant - I've registered a bug report for this scenario.