2

I have the following 3D object.

thickness = 10;
laminate = 
 Graphics3D[{{Rotate[{Darker@Blue, EdgeForm[None], 
      Cuboid[{0, 0, 0}, {thickness, thickness, 1}]}, 
     13.189 Degree, {0, 1, 0}]}, {Rotate[{Darker@Red, EdgeForm[None], 
      Cuboid[{0, 0, 1}, {thickness, thickness, 2}]}, 
     13.189 Degree, {0, 1, 0}]}, {Rotate[{Darker@Blue, EdgeForm[None],
       Cuboid[{0, 0, 2}, {thickness, thickness, 3}]}, 
     13.189 Degree, {0, 1, 0}]}, {Rotate[{Darker@Red, EdgeForm[None], 
      Cuboid[{0, 0, 3}, {thickness, thickness, 4}]}, 
     13.189 Degree, {0, 1, 0}]}, {Rotate[{Darker@Blue, EdgeForm[None],
       Cuboid[{0, 0, 4}, {thickness, thickness, 5}]}, 
     13.189 Degree, {0, 1, 0}]}, {Rotate[{Darker@Red, EdgeForm[None], 
      Cuboid[{0, 0, 5}, {thickness, thickness, 6}]}, 
     13.189 Degree, {0, 1, 0}]}, {Rotate[{Darker@Blue, EdgeForm[None],
       Cuboid[{0, 0, 6}, {thickness, thickness, 7}]}, 
     13.189 Degree, {0, 1, 0}]}, {Rotate[{Darker@Red, EdgeForm[None], 
      Cuboid[{0, 0, 7}, {thickness, thickness, 8}]}, 
     13.189 Degree, {0, 1, 0}]}, {Rotate[{Darker@Blue, EdgeForm[None],
       Cuboid[{0, 0, 8}, {thickness, thickness, 9}]}, 
     13.189 Degree, {0, 1, 0}]}, {Rotate[{Darker@Red, EdgeForm[None], 
      Cuboid[{0, 0, 9}, {thickness, thickness, 10}]}, 
     13.189 Degree, {0, 1, 0}]}, {Rotate[{Darker@Blue, EdgeForm[None],
       Cuboid[{0, 0, 10}, {thickness, thickness, 11}]}, 
     13.189 Degree, {0, 1, 0}]}, {Rotate[{Darker@Red, EdgeForm[None], 
      Cuboid[{0, 0, 11}, {thickness, thickness, 12}]}, 
     13.189 Degree, {0, 1, 0}]}, {Rotate[{Darker@Blue, EdgeForm[None],
       Cuboid[{0, 0, 12}, {thickness, thickness, 13}]}, 
     13.189 Degree, {0, 1, 0}]}(*,{Opacity[0.3],FaceForm[White],
   Hexahedron[{{4,4,0},{8,4,0},{8,8,0},{4,8,0},{4,4,13},{8,4,13},{8,8,
   13},{4,8,13}}]}*)}, Boxed -> False, ViewPoint -> viewPcell, 
  ImageSize -> 300]

enter image description here

I would like to take a portion out of it. Here is what my portion looks like (it is extended down to the bottom of my 3D object)

enter image description here

I expect to get something like this.

enter image description here

What is the most efficient way to do this? I have tried both PlotRange and ClipPlane, but none give what I am looking for. In particular, ClipPlane gives:

ClipPlanes -> {InfinitePlane[{{0, 0, 0}, {1, 0, 0}, {0, 1, 0}}], 
  InfinitePlane[{{6, 3, 0}, {3, 3, 0}, {6, 3, 10}}], 
  InfinitePlane[{{3, 3, 0}, {3, 6, 0}, {3, 6, 10}}], 
  InfinitePlane[{{6, 6, 0}, {6, 3, 0}, {6, 6, 
     10}}]}, ClipPlanesStyle -> Opacity[0.3]

enter image description here

As shown, ClipPlane does not represent a closed shape. Any workaround for my purpose?

Thanks

Edit:

A related question is found here: Why ClipPlane show a hollow object for a filled object?

KratosMath
  • 1,287
  • 8
  • 19

1 Answers1

2
hexahedron = Hexahedron[{{4, 4, 0}, {8, 4, 0}, {8, 8, 0}, {4, 8, 0}, {4, 4, 
     13}, {8, 4, 13}, {8, 8, 13}, {4, 8, 13}}];

ClearAll[tReg, regInt]
tReg[z_] := TransformedRegion[Cuboid[{0, 0, z}, {thickness, thickness, 1 + z}], 
   RotationTransform[13.189 Degree, {0, 1, 0}]];

regInt[z_, reg_: hexahedron] := 
 RegionIntersection[DiscretizeRegion[tReg[z]], DiscretizeRegion @ reg, 
  BaseStyle -> Directive[EdgeForm[], Darker[{Red, Blue}[[Mod[z, 2, 1]]]]]]

regInt /@ Range[2, 10]

enter image description here

Show[regInt /@ Range[2, 10]]

enter image description here

Show[regInt /@ Range[2, 10], 
 Graphics3D[{EdgeForm[Gray], Opacity[.1, Green], hexahedron}]]

enter image description here

Replace Range[2, 10] with Range[1, 13] above to get

enter image description here

kglr
  • 394,356
  • 18
  • 477
  • 896