Using OCCT it is possible. You need change schema version for writing. I don't know how to do this on pythonOCC.
Best regards, Commenter-1.
Archived discussion
I have a CAD file. I exported it in STEP 214 and STP 242.
When open with this both files with:
from OCC.Core.STEPControl import STEPControl_Reader from OCC.Core.StlAPI import StlAPI_Writer input_file = r"step.STP" step_reader = STEPControl_Reader() step_reader.ReadFile( input_file ) step_reader.TransferRoot() myshape = step_reader.Shape()
The step file 214 opens with no problem and the 242 gives the message
*** ERR StepReaderData : Unresolved Reference : Fails Count : 416 ***
So my idea is to convert 242 into 214. Is this possible?
Thanks in advance.
Discussion
Posts are displayed in their archived order.
Using OCCT it is possible. You need change schema version for writing. I don't know how to do this on pythonOCC.
Best regards, Commenter-1.
Can you give an example in c++?
Thanks.
/*
enum WriteMode_StepSchema
{
WriteMode_StepSchema_AP214CD = 1,
WriteMode_StepSchema_AP214DIS,
WriteMode_StepSchema_AP203,
WriteMode_StepSchema_AP214IS,
WriteMode_StepSchema_AP242DIS
};*/
STEPCAFControl_Controller::Init();
Interface_Static::SetIVal("write.step.schema", 1);
//... StepCafControl_Reader...
// ...
//... StepCafControl_Writer...
// ...Best regards, Commenter-1.