Most of the time, this happens when you have one or more BRep that are not organized in an assembly tree. Please try to move your entities inside a Block and add a BlockReference to the scene, then export the STEP file again.
If you are reading a STEP file, you can:
string fileName = "input.step";
if (File.Exists(fileName))
{
DesignDocument dd = new DesignDocument();
ReadSTEP fileReader = new ReadSTEP(fileName);
fileReader.DoWork();
fileReader.OpenTo(dd);
string blockName = "Wrapper";
Block bl = new Block(blockName);
bl.Entities.AddRange(dd.Entities);
dd.Entities.Clear();
dd.Blocks.Add(bl);
dd.Entities.Add(new BlockReference(blockName));
WriteFileAsync fileWriter = new WriteSTEP(dd, "output.step");
fileWriter.DoWork();
}
Comments
Please sign in to leave a comment.