OCC STEP File error when loading in solidworks or pro/e

Hello everybody,

I have some problems when I try to to save the following shape into a step file in OCC:

gp_Pnt pnt_pos(0, 0, 0);
gp_Dir dir_ric(1, 0, 0);
gp_Dir dir_nor(1, 1, 1);
gp_Dir dir_stu(0, 1, 0);
Standard_Real radius 100;
Standard_Real radius_stutzen 10;
Standard_Real laenge 200;
Standard_Real laenge_stutzen 50;

gp_Ax2 ax2_lok(pnt_pos, dir_ric.Reversed(), dir_stu);
gp_Ax1 axe_ric(pnt_pos, dir_ric);
Handle(Geom_RectangularTrimmedSurface) innenwand_1 = GC_MakeTrimmedCylinder(axe_ric, radius, laenge);
TopoDS_Face iwand_zyl_face = BRepBuilderAPI_MakeFace(innenwand_1);
TopoDS_Shape iwand_zyl = iwand_zyl_face;

gp_Vec vec_stu(dir_ric);
vec_stu.Scale( laenge / 2.);
gp_Ax1 axe_stu(pnt_pos.Translated(vec_stu), ax2_lok.XDirection());
Handle(Geom_RectangularTrimmedSurface) innenwand_2 = GC_MakeTrimmedCylinder(axe_stu, radius_stutzen, radius + laenge_stutzen);
TopoDS_Face iwand_stu_face = BRepBuilderAPI_MakeFace(innenwand_2);
TopoDS_Shape iwand_stu = iwand_stu_face;

gp_Ax2 ax2_zyl = gp_Ax2(pnt_pos, dir_ric);
TopoDS_Solid vollzyl = BRepPrimAPI_MakeCylinder(ax2_zyl, radius, laenge);

gp_Ax2 ax2_stu = gp_Ax2(pnt_pos.Translated(vec_stu), ax2_lok.XDirection());
TopoDS_Solid vollstu = BRepPrimAPI_MakeCylinder(ax2_stu, radius_stutzen, radius + laenge_stutzen);

TopoDS_Shape zyl = BRepAlgoAPI_Cut(iwand_zyl, vollstu);

TopoDS_Compound zylinder;
BRep_Builder aBuilder;
aBuilder.MakeCompound (zylinder);
aBuilder.Add (zylinder, zyl);
aBuilder.Add (zylinder, stu);

// The zylinder compound the is written to step via:

STEPControl_Writer writer;
writer.Transfer( zylinder , STEPControl_ShellBasedSurfaceModel);

The shape is are just two orthogonal pipes that are melted together. The step export works just fine. When I open the Step File in GMSH, which is based on the OCC library, there are no problems opening the file. But when I try to open the step file in pro/e or solidworks there are some problems. One of the two pipes are not opened.

Thanks for helping me in advance!


Aycan's picture

If one of the two pipes is selected before you export, it could be, you should select all.