
Mon, 06/02/2025 - 11:47
Hello,
I have an application that creates step files with productnames:
std::ostringstream outputStream; STEPControl_Writer writer; Interface_Static::SetCVal("write.step.product.name", productName.c_str()); IFSelect_ReturnStatus transferStatus = writer.Transfer(shape, STEPControl_AsIs); if (transferStatus != IFSelect_RetDone) return ""; IFSelect_ReturnStatus writeStatus = writer.WriteStream(outputStream); if (writeStatus == IFSelect_RetDone) return outputStream.str();
However, the stepwriter add a number to the end of the productname (I used productName = "myProductName"):
#7 = PRODUCT('myProductName 1','myProductName 1','',(#8));
Is there any way to prevent the stepwriter from doing this?
(OpenCascade version 7.9.0)
Thanks in advance,
Martijn
Tue, 06/03/2025 - 18:50
Hello. It can't be changed natively. The one of the option - you can iterate under the created model tree and extract all PRODUCT entity and change their name manually.
But if you want to change the implementation, the code responsible for the naming here:
https://github.com/Open-Cascade-SAS/OCCT/tree/master/src/DataExchange/TK...
Best regards, Dmitrii.