add bed and brep source code