Class Shell3D
A Shell3D is a simple sector-like envelope around one group of
synthetic wires. It is not a general solid modeling class. Its purpose is to
provide a shared model object for two demos:
- the 2D MDI slice view, where the shell produces a 2D polygon by intersecting a constant-phi plane, and
- the companion MDI-3D view, where the shell is drawn directly as a wireframe so readers can see the object that the 2D slice cuts through.
-
Method Summary
Modifier and TypeMethodDescriptionLine[]Create a 3D wireframe representation of this shell.static Shell3DforChamber(int chamber, double chamberR0, double chamberZ0) Create a shell for the given chamber-like region.static doubleReturn the maximum shell azimuth.static doubleReturn the minimum shell azimuth.intReturn the zero-based region index.doublegetZMax()Return the maximum z coordinate of the shell envelope.doublegetZMin()Return the minimum z coordinate of the shell envelope.label()Return the human-readable shell label.slicePolygon(double phiDeg) Create the shell intersection polygon for a constant-phi slice.
-
Method Details
-
forChamber
Create a shell for the given chamber-like region.- Parameters:
chamber- zero-based chamber indexchamberR0- base radial coordinatechamberZ0- base z coordinate- Returns:
- shell for the given chamber
-
getPhiMinDeg
public static double getPhiMinDeg()Return the minimum shell azimuth.- Returns:
- minimum shell phi in degrees
-
getPhiMaxDeg
public static double getPhiMaxDeg()Return the maximum shell azimuth.- Returns:
- maximum shell phi in degrees
-
getRegionIndex
public int getRegionIndex()Return the zero-based region index.- Returns:
- zero-based region index
-
getZMin
public double getZMin()Return the minimum z coordinate of the shell envelope.- Returns:
- minimum shell z
-
getZMax
public double getZMax()Return the maximum z coordinate of the shell envelope.- Returns:
- maximum shell z
-
label
Return the human-readable shell label.- Returns:
- label such as
"region 2"
-
slicePolygon
Create the shell intersection polygon for a constant-phi slice.This method creates four 3D shell-corner lines spanning the sector in azimuth and intersects those lines with the current constant-phi plane. Thus the shell moves with the slider by the same mechanism as the wires: both are generated by real intersections with the current slice plane.
- Parameters:
phiDeg- current slice azimuth, in degrees- Returns:
- four slice-coordinate points, or
nullif out of range
-
createWireframeEdges
Create a 3D wireframe representation of this shell.The returned lines trace the four boundaries at the minimum-phi side, the four boundaries at the maximum-phi side, and the four azimuth-spanning connector edges. This is meant for explanatory rendering in the companion 3D view. The 2D slice view does not need these edges; it uses
slicePolygon(double)instead.- Returns:
- twelve finite 3D line segments forming the shell wireframe
-