shapesmith.deprecated icon indicating copy to clipboard operation
shapesmith.deprecated copied to clipboard

Export & Import as BREP and STEP

Open 5263 opened this issue 12 years ago • 5 comments

Would be useful for thingiverse integration.

5263 avatar Jun 26 '12 18:06 5263

STEP yes. Do you mean OpenCASCADE BREP format? Does FreeCAD use this?

bjnortier avatar Jun 26 '12 19:06 bjnortier

Yes and yes. pythonocc, Cadmium and openshapefactory allow export in OpenCASCADE Brep File format as well.

5263 avatar Jun 26 '12 19:06 5263

Ok, that shouldn't be too hard. Assuming it's the format already used to serialize brep

bjnortier avatar Jun 26 '12 19:06 bjnortier

The limitation is basicly that a brep file contains only one shape. So maybe one has to build a Compound first.

# include <BRepTools.hxx>
BRepTools::Write (const TopoDS_Shape& sh, const Standard_CString file)

STEP (or IGES) would be more complicated, depending how much information you want to support and if you use OCAF.

5263 avatar Jun 27 '12 09:06 5263

Thanks, yes. That's what is used to serialise to disk. Shapesmith doesn't use OCAF.

bjnortier avatar Jun 27 '12 10:06 bjnortier