Skip to content

Commit

Permalink
Revert "creating TestMotionBasedCanting"
Browse files Browse the repository at this point in the history
  • Loading branch information
e10harvey authored Jan 7, 2025
1 parent b2addd5 commit bcb0eea
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 6,057 deletions.
16 changes: 0 additions & 16 deletions opencsp/common/lib/csp/Facet.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,22 +127,6 @@ def orthorectified_slope_array(self, x_vec: np.ndarray, y_vec: np.ndarray) -> np
slope_data = np.reshape(slope_data, (2, y_vec.size, x_vec.size)) # facet child
return slope_data # facet child

def get_2D_dimensions(self) -> tuple[float, float]:
"""Returns width and heightin facet's child coordinate
reference frame.
Returns
-------
tuple[float, float]
Width: following (+)x infinity in the (-) direction for x_max(right) - following (-x) infinity in the (+) direction for x_min(left).
Height: following (+)y infinity in the (-) direction for y_max(top) - following (-y) infinity in the (+) direction for y_min(bottom).
Facet's child coordinate reference frame.
"""
left, right, bottom, top = self.axis_aligned_bounding_box
width = right - left
height = top - bottom
return width, height

# override function from RayTraceable
def most_basic_ray_tracable_objects(self) -> list[RayTraceable]:
return self.mirror.most_basic_ray_tracable_objects()
Expand Down
2 changes: 0 additions & 2 deletions opencsp/common/lib/csp/HeliostatAbstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,6 @@ def set_canting_from_equation(self, func: FunctionXYContinuous) -> None:

self.facet_ensemble.set_facet_cantings(facet_canting_rotations)

return facet_canting_rotations

# RENDERING

def draw(self, view: View3d, heliostat_style: RenderControlHeliostat = None, transform: TransformXYZ = None):
Expand Down
49 changes: 13 additions & 36 deletions opencsp/common/lib/csp/Tower.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ class Tower(RayTraceable):
parts : list[str]
The parts that build the Tower. Includes walls (top, northface, southface, bottom), and optionl target.
height : float
The height of Tower. Currently set for NSTTF Tower height of 63.5508 m.
The height of Tower. Currently set for NSTTF Tower height of 61 m.
east : float
The East wall of the Tower. Currently set for 5.485 m. TODO, MHH find dimensions of tower (in particular width)
The East wall of the Tower. Currently set for 8.8 m. TODO, MHH find dimensions of tower (in particular width)
west : float
The West wall of the Tower. Currently set for 5.485 m.
The West wall of the Tower. Currently set for 8.8 m.
south : float
The South wall of the Tower. Currently set for 9.1168 m.
The South wall of the Tower. Currently set for 8.8 m.
north : float
The North wall of the Tower. Currently set for 6.25 m.
The North wall of the Tower. Currently set for 8.8 m.
x_aim : float
The x component of the target in relation to the Tower origin.
y_aim : float
Expand All @@ -52,16 +52,14 @@ def __init__(
name: str,
origin: Pxyz,
parts: list[str] = ["whole tower"],
height: float = 63.5508,
east: float = 5.485,
west: float = -5.485,
south: float = -9.1186,
north: float = 6.25,
height: float = 100,
east: float = 8.8,
west: float = -8.8,
south: float = -8.8,
north: float = 8.8,
x_aim: float = 0,
y_aim: float = 6.25,
z_aim: float = 63.5508,
bcs_y_aim: float = 8.8,
bcs_z_aim: float = 28.9,
y_aim: float = 8.8,
z_aim: float = 100,
):

# parameters used for control tower at NSTTF
Expand All @@ -71,21 +69,7 @@ def __init__(
# east = 8.8,
# west = -8.8,
# south = 284,
# north = 300
# x_aim: float = 0,
# y_aim: float = 6.25,
# z_aim: float = 63.5508,)
# SOFAST_calculations:
# height: float = 63.5508,
# east: float = 5.485,
# west: float = -5.485,
# south: float = -9.1186,
# north: float = 6.25,
# x_aim: float = 0,
# y_aim: float = 6.25,
# z_aim: float = 64.8008,
# bcs_y_aim: float = 8.8,
# bcs_z_aim: float = 28.9,
# north = 300)
"""Create a new Tower instance.
Parameters:
Expand All @@ -108,10 +92,7 @@ def __init__(
self.x_aim = x_aim
self.y_aim = y_aim
self.z_aim = z_aim
self.bcs_y_aim = bcs_y_aim
self.bcs_z_aim = bcs_z_aim
self.target_loc = Pxyz([x_aim, y_aim, z_aim])
self.bcs = Pxyz([x_aim, bcs_y_aim, bcs_z_aim])

# Tower faces, top, and bottom
self.top = [
Expand Down Expand Up @@ -154,7 +135,6 @@ def __init__(
"""
The target location given the x, y, and z components.
"""
self.bcs_point = [self.x_aim, self.bcs_y_aim, self.bcs_z_aim]

def walls(self):
"""Returns the list of walls as top, north, south, and bottom."""
Expand Down Expand Up @@ -193,7 +173,4 @@ def draw(self, view: View3d, tower_style: RenderControlTower) -> None:
if "target" in self.parts:
view.draw_xyz(self.point, style=tower_style.target)

if "bcs" in self.parts:
view.draw_xyz(self.bcs_point, style=tower_style.bcs)

return
10 changes: 0 additions & 10 deletions opencsp/common/lib/render_control/RenderControlFacet.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,6 @@ def outline(color='k'):
)


def outline_thin(color='k', linewidth=0.5):
return RenderControlFacet(
draw_centroid=False,
draw_outline=True,
outline_style=rcps.outline(color=color, linewidth=linewidth),
draw_surface_normal=False,
draw_name=False,
)


def outline_name(color='k'):
return RenderControlFacet(
draw_centroid=False,
Expand Down
11 changes: 0 additions & 11 deletions opencsp/common/lib/render_control/RenderControlFacetEnsemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,6 @@ def facet_outlines(color='k', **kwargs):
)


def facet_outlines_thin(color='k', linewidth=0.25, **kwargs):
return RenderControlFacetEnsemble(
draw_normal_vector=False,
default_style=rcf.outline_thin(color=color, linewidth=linewidth),
normal_vector_style=rcps.outline(color=color),
normal_vector_base_style=rcps.marker(color=color),
draw_centroid=False,
**kwargs
)


def facet_ensemble_outline(color='k', normal_vector_length=4.0, **kwargs):
return RenderControlFacetEnsemble(
draw_normal_vector=True,
Expand Down
9 changes: 0 additions & 9 deletions opencsp/common/lib/render_control/RenderControlTower.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ def __init__(
point_styles: RenderControlPointSeq = None,
wire_frame: RenderControlPointSeq = None,
target: RenderControlPointSeq = None,
bcs: RenderControlPointSeq = None,
) -> None:
"""
Controls for rendering a tower.
Expand Down Expand Up @@ -49,8 +48,6 @@ def __init__(
wire_frame = rcps.outline()
if target is None:
target = rcps.marker(marker='x', color='r', markersize=6)
if bcs is None:
bcs = rcps.marker(marker='+', color='b', markersize=6)

super(RenderControlTower, self).__init__()

Expand All @@ -61,7 +58,6 @@ def __init__(
self.point_styles = point_styles
self.wire_frame = wire_frame
self.target = target
self.bcs = bcs

def style(self, any):
""" "style" is a method commonly used by RenderControlEnsemble.
Expand All @@ -79,8 +75,3 @@ def normal_tower():
def no_target():
# tower outline with no target.
return RenderControlTower(wire_frame=rcps.outline(color='g'), target=False)


def no_bcs():
# tower outline with not bcs.
return RenderControlTower(wire_frame=rcps.outline(color='g'), bcs=False)
Loading

0 comments on commit bcb0eea

Please sign in to comment.