When I create an Oval shape, save it as an HSF file, and then reload it, an error occurs

Here is my test code:

void CSolidHoopsView::OnExtraSlot1()
{
HC_KEY nModelKey = GetHoopsView()->GetModelKey();

HC_Open_Segment_By_Key(nModelKey); {
    HC_Open_Segment("OvalText"); {
        HC_Set_Text_Font("background=(on,shape=oval)");
        HC_Insert_Text(-0.8, 0.8, 0, "corner trimmed box");
    } HC_Close_Segment();
}HC_Close_Segment();

}

After creating the text and saving it as HSF, when I read it again, the following error occurs.

How can I solve this problem?

Thank you always for your kind answers.

Hi There,

I have duplicated the behavior you describe. We’re looking into this further. We understand that you are working with o ne of our team members based in our Japan office. We will let him know about this issue and he will contact you directly.

For the benefit of other Forum users we can post an update when we have more information.

regards,

Peter Kane

Hello mini,

We acknowledge that this is a bug and this will be corrected in a future version of HOOPS.

We found a workaround where you have to add option “margins=50%” and you will no longer see the error reported. Please use this as a workaround in the meantime.

HC_Set_Text_Font("background=(on, shape=oval,margins = 50%)");

Best Regards,
Simon

1 Like