# create the bounding polygon
usc = st.spar_cap.layer['upper']
is2 = st.internal_surface_2.layer['resin']
points_usc = [
    (-0.75, usc.left[0][1]),              # SparCap_upper.txt
    is2.polygon.interiors[0].coords[0],   # InternalSurface2_resin.txt
    is2.polygon.interiors[0].coords[72-50],   # InternalSurface2_resin.txt
    ( 0.75, usc.right[1][1]),             # SparCap_upper.txt
    ( 0.75, 0.7),
    (-0.75, 0.7)
    ]
bounding_polygon = Polygon(points_usc)
pu.plot_polygon(bounding_polygon, 'None', '#000000')

# cut the new layer polygons
pu.cut_plot_and_write_alt_layer(st.external_surface, 'triax', label, 
    bounding_polygon)
pu.cut_plot_and_write_alt_layer(st.external_surface, 'gelcoat', label, 
    bounding_polygon)
pu.cut_plot_and_write_alt_layer(st.internal_surface_2, 'resin', label, 
    bounding_polygon)
pu.cut_plot_and_write_alt_layer(st.internal_surface_2, 'triax', label, 
    bounding_polygon)

# lower spar cap -----------------------------------------------------------
label = 'lower spar cap'

# create the bounding polygon
lsc = st.spar_cap.layer['lower']
points_lsc = [
    (-0.75,-0.35),
    ( 0.75,-0.35),
Esempio n. 2
0
# create the bounding polygon
usc = st.lower_spar_cap.layer['upper']
is2 = st.lower_internal_surface_2.layer['resin']
points_usc = [
    (-0.75, usc.left[0][1]),             # lower_SparCap_upper.txt
    is2.polygon.interiors[0].coords[0], # lower_InternalSurface2_resin.txt
    is2.polygon.interiors[0].coords[39-28], # lower_InternalSurface2_resin.txt
    ( 0.75, usc.right[1][1]),            # lower_SparCap_upper.txt
    ( 0.75, 0.0),
    (-0.75, 0.0)
    ]
bounding_polygon = Polygon(points_usc)
pu.plot_polygon(bounding_polygon, 'None', '#000000')

# cut the new layer polygons
pu.cut_plot_and_write_alt_layer(st.lower_external_surface, 'triax', label, 
    bounding_polygon, airfoil='lower')
pu.cut_plot_and_write_alt_layer(st.lower_external_surface, 'gelcoat', label, 
    bounding_polygon, airfoil='lower')
pu.cut_plot_and_write_alt_layer(st.lower_internal_surface_2, 'resin', label, 
    bounding_polygon, airfoil='lower')
pu.cut_plot_and_write_alt_layer(st.lower_internal_surface_2, 'triax', label, 
    bounding_polygon, airfoil='lower')

# lower spar cap -----------------------------------------------------------
label = 'lower spar cap'

# create the bounding polygon
lsc = st.lower_spar_cap.layer['lower']
points_lsc = [
    (-0.75,-6.5),
    ( 0.75,-6.5),
# create the bounding polygon
usc = st.spar_cap.layer['upper']
is2 = st.internal_surface_2.layer['resin']
points_usc = [
    (-0.75, usc.left[0][1]),  # SparCap_upper.txt
    is2.polygon.interiors[0].coords[0],  # InternalSurface2_resin.txt
    (0.74, 1.91931038),  # InternalSurface2_resin.txt
    (0.75, usc.right[1][1]),  # SparCap_upper.txt
    (0.75, 2.1),
    (-0.75, 2.1)
]
bounding_polygon = Polygon(points_usc)
pu.plot_polygon(bounding_polygon, 'None', '#000000')

# cut the new layer polygons
pu.cut_plot_and_write_alt_layer(st.root_buildup, 'triax', label,
                                bounding_polygon)
pu.cut_plot_and_write_alt_layer(st.external_surface, 'triax', label,
                                bounding_polygon)
pu.cut_plot_and_write_alt_layer(st.external_surface, 'gelcoat', label,
                                bounding_polygon)
pu.cut_plot_and_write_alt_layer(st.internal_surface_2, 'resin', label,
                                bounding_polygon)
pu.cut_plot_and_write_alt_layer(st.internal_surface_2, 'triax', label,
                                bounding_polygon)

# lower spar cap -----------------------------------------------------------
label = 'lower spar cap'

# create the bounding polygon
lsc = st.spar_cap.layer['lower']
points_lsc = [
# upper --------------------------------------------------------------------
label = 'upper'

# create the bounding polygon
is1 = st.internal_surface_1.layer['resin']
points_u = [
    (is1.polygon.interiors[0].coords[0][0],0.014),   # InternalSurface1_resin.txt
    is1.polygon.interiors[0].coords[0],   # InternalSurface1_resin.txt
    is1.polygon.interiors[0].coords[50-40],   # InternalSurface1_resin.txt
    (is1.polygon.interiors[0].coords[50-40][0],0.014)   # InternalSurface1_resin.txt
    ]
bounding_polygon = Polygon(points_u)
pu.plot_polygon(bounding_polygon, 'None', '#000000')

# cut the new layer polygons
pu.cut_plot_and_write_alt_layer(st.external_surface, 'triax', label, 
    bounding_polygon)
pu.cut_plot_and_write_alt_layer(st.external_surface, 'gelcoat', label, 
    bounding_polygon)
pu.cut_plot_and_write_alt_layer(st.internal_surface_1, 'resin', label, 
    bounding_polygon)
pu.cut_plot_and_write_alt_layer(st.internal_surface_1, 'triax', label, 
    bounding_polygon)

# lower --------------------------------------------------------------------
label = 'lower'

# create the bounding polygon
points_l = [
    (is1.polygon.interiors[0].coords[0][0],-0.0063),   # InternalSurface1_resin.txt
    is1.polygon.interiors[0].coords[0],   # InternalSurface1_resin.txt
    is1.polygon.interiors[0].coords[50-40],   # InternalSurface1_resin.txt
# create the bounding polygon
usc = st.spar_cap.layer['upper']
is2 = st.internal_surface_2.layer['resin']
points_usc = [
    (-0.75, usc.left[0][1]),  # SparCap_upper.txt
    is2.polygon.interiors[0].coords[0],  # InternalSurface2_resin.txt
    is2.polygon.interiors[0].coords[48 - 34],  # InternalSurface2_resin.txt
    (0.75, usc.right[1][1]),  # SparCap_upper.txt
    (0.75, 0.7),
    (-0.75, 0.7)
]
bounding_polygon = Polygon(points_usc)
pu.plot_polygon(bounding_polygon, 'None', '#000000')

# cut the new layer polygons
pu.cut_plot_and_write_alt_layer(st.external_surface, 'triax', label,
                                bounding_polygon)
pu.cut_plot_and_write_alt_layer(st.external_surface, 'gelcoat', label,
                                bounding_polygon)
pu.cut_plot_and_write_alt_layer(st.internal_surface_2, 'resin', label,
                                bounding_polygon)
pu.cut_plot_and_write_alt_layer(st.internal_surface_2, 'triax', label,
                                bounding_polygon)

# lower spar cap -----------------------------------------------------------
label = 'lower spar cap'

# create the bounding polygon
lsc = st.spar_cap.layer['lower']
points_lsc = [
    (-0.75, -0.35),
    (0.75, -0.35),
Esempio n. 6
0
is2 = st.lower_internal_surface_2.layer['resin']
points_usc = [
    (-0.75, usc.left[0][1]),  # lower_SparCap_upper.txt
    is2.polygon.interiors[0].coords[0],  # lower_InternalSurface2_resin.txt
    (0.742, -0.69618860),  # lower_InternalSurface2_resin.txt
    (0.75, usc.right[1][1]),  # lower_SparCap_upper.txt
    (0.75, 0.0),
    (-0.75, 0.0)
]
bounding_polygon = Polygon(points_usc)
pu.plot_polygon(bounding_polygon, 'None', '#000000')

# cut the new layer polygons
pu.cut_plot_and_write_alt_layer(st.lower_root_buildup,
                                'triax',
                                label,
                                bounding_polygon,
                                airfoil='lower')
pu.cut_plot_and_write_alt_layer(st.lower_external_surface,
                                'triax',
                                label,
                                bounding_polygon,
                                airfoil='lower')
pu.cut_plot_and_write_alt_layer(st.lower_external_surface,
                                'gelcoat',
                                label,
                                bounding_polygon,
                                airfoil='lower')
pu.cut_plot_and_write_alt_layer(st.lower_internal_surface_2,
                                'resin',
                                label,
# create the bounding polygon
usc = st.lower_spar_cap.layer['upper']
is2 = st.lower_internal_surface_2.layer['resin']
points_usc = [
    (-0.75, usc.left[0][1]),             # lower_SparCap_upper.txt
    is2.polygon.interiors[0].coords[0],  # lower_InternalSurface2_resin.txt
    ( 0.742, -0.69618860),               # lower_InternalSurface2_resin.txt
    ( 0.75, usc.right[1][1]),            # lower_SparCap_upper.txt
    ( 0.75, 0.0),
    (-0.75, 0.0)
    ]
bounding_polygon = Polygon(points_usc)
pu.plot_polygon(bounding_polygon, 'None', '#000000')

# cut the new layer polygons
pu.cut_plot_and_write_alt_layer(st.lower_root_buildup, 'triax', label, 
    bounding_polygon, airfoil='lower')
pu.cut_plot_and_write_alt_layer(st.lower_external_surface, 'triax', label, 
    bounding_polygon, airfoil='lower')
pu.cut_plot_and_write_alt_layer(st.lower_external_surface, 'gelcoat', label, 
    bounding_polygon, airfoil='lower')
pu.cut_plot_and_write_alt_layer(st.lower_internal_surface_2, 'resin', label, 
    bounding_polygon, airfoil='lower')
pu.cut_plot_and_write_alt_layer(st.lower_internal_surface_2, 'triax', label, 
    bounding_polygon, airfoil='lower')

# lower spar cap -----------------------------------------------------------
label = 'lower spar cap'

# create the bounding polygon
lsc = st.lower_spar_cap.layer['lower']
points_lsc = [