create boxes in diagonal

hallo everyone,

i´mtrying to make boxes not only in (x, y, z) directions.

I found found this code which helps me make boxes.

private static TopoDS_Shape createCuttedBox()
	{
		TopoDS_Shape box1 = new BRepPrimAPI_MakeBox(
			new double[3], new double[]{4, 3, 2}).shape();

		TopoDS_Shape box2 = new BRepPrimAPI_MakeBox(
			new double[]{-1,-1,-1}, new double[]{3, 2, 1}).shape();

return new BRepAlgoAPI_Cut(box1, box2).shape();

The problem is : i can´t make boxes in diagonal     like in the picture attached.

Can someone please help me… it is part of my thesis.

This is a very specific issue. The repository (https://github.com/tpaviot/oce) seems to be active, you’re more likely to get a useful response if you either 1) post an issue with your question or 2) post your question to their Google group.

1 Like