int main()
{
BRepPrimAPI_MakeSphere shpherMaker1( 10.0 );
TopoDS_Shape shpere = shpherMaker1.Shape();
BRepPrimAPI_MakeSphere shpherMaker1( 10.0 );
TopoDS_Shape shpere1 = shpherMaker1.Shape();
BRepPrimAPI_MakeSphere shpherMaker2( 10.0 );
TopoDS_Shape shpere2 = shpherMaker2.Shape();
gp_Trsf transform;
transform.SetValues( 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 1, 0 , 0 , 0 );
BRepBuilderAPI_Transform trf( sphere , transform );
gp_Trsf transform1;
// transform1.SetValues( 1 , 0 , 0 , 0 , 0 , 1,0 , 1000 , 0 , 0, 1, 0 );
transform1.SetValues( 0 , 1 , 0 , 0 , 0 , 0 , 1 , 1000 , 1 , 0 , 0 , 0 );
BRepBuilderAPI_Transform trf1( shpere1 , transform1 );
gp_Trsf transform2;
transform2.SetValues( 0 , 1 , 0 , 0 , 0 , 0 , 1 , 1050 , 1 , 0 , 0 , 0 );
BRepBuilderAPI_Transform trf2( shpere2 , transform2 );
BRepAlgoAPI_Fuse booleanOperation( trf1.Shape() , trf2.Shape() );
TopoDS_Shape resultShape = booleanOperation.Shape();
gp_Trsf transform3;
transform3.SetValues( 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 1 , 0 , 0 , 0 );
BRepBuilderAPI_Transform resultShapetrf2( resultShape , transform3 );
TopoDS_Compound compound;
BRep_Builder builder;
builder.MakeCompound( compound );
builder.Add( compound , trf );
builder.Add( compound , trf1 );
builder.Add( compound , trf2 );
builder.Add( compound , resultShapetrf2 );
BRepTools::Write( compound , "d:/ddddddddddddddddd.brep" );
}