image

Union(BRepAlgoAPI_Fuse)

gp_Pnt corner1 = gp_Pnt(0, 0, 0);
gp_Pnt corner2 = gp_Pnt(1000, 100, 100);
TopoDS_Shape box1 = BRepPrimAPI_MakeBox(corner1, corner2);

gp_Pnt corner3 = gp_Pnt(450, -500, 50);
gp_Pnt corner4 = gp_Pnt(550, 500, 150);
TopoDS_Shape box2 = BRepPrimAPI_MakeBox(corner3, corner4);

TopoDS_Shape fuse = BRepAlgoAPI_Fuse(box1, box2);

image

Difference(BRepAlgoAPI_Cut)

gp_Pnt corner1 = gp_Pnt(0, 0, 0);
gp_Pnt corner2 = gp_Pnt(1000, 100, 100);
TopoDS_Shape box1 = BRepPrimAPI_MakeBox(corner1, corner2);

gp_Pnt corner3 = gp_Pnt(450, -500, 50);
gp_Pnt corner4 = gp_Pnt(550, 500, 150);
TopoDS_Shape box2 = BRepPrimAPI_MakeBox(corner3, corner4);

TopoDS_Shape cut = BRepAlgoAPI_Cut(box1, box2);

image

Intersection(BRepAlgoAPI_Common)

gp_Pnt corner1 = gp_Pnt(0, 0, 0);
gp_Pnt corner2 = gp_Pnt(1000, 100, 100);
TopoDS_Shape box1 = BRepPrimAPI_MakeBox(corner1, corner2);

gp_Pnt corner3 = gp_Pnt(450, -500, 50);
gp_Pnt corner4 = gp_Pnt(550, 500, 150);
TopoDS_Shape box2 = BRepPrimAPI_MakeBox(corner3, corner4);

TopoDS_Shape common = BRepAlgoAPI_Common(box1, box2);

image

카테고리:

업데이트:

댓글남기기