예제 #1
0
def CockpitWindowContours(Height=1.620, Depth=5):
    P1 = [0.000, 0.076, Height - 1.620 + 2.194]
    P2 = [0.000, 0.852, Height - 1.620 + 2.290]
    P3 = [0.000, 0.904, Height + 0.037]
    P4 = [0.000, 0.076, Height]
    CWC1 = rs.AddPolyline([P1, P2, P3, P4, P1])
    rs.SelectObject(CWC1)
    rs.Command("_FilletCorners 0.08 ")

    P1 = [0.000, 0.951, Height - 1.620 + 2.289]
    P2 = [0.000, 1.343, Height - 1.620 + 2.224]
    P3 = [0.000, 1.634, Height - 1.620 + 1.773]
    P4 = [0.000, 1.557, Height - 1.620 + 1.588]
    P5 = [0.000, 1.027, Height - 1.620 + 1.671]
    CWC2 = rs.AddPolyline([P1, P2, P3, P4, P5, P1])
    rs.SelectObject(CWC2)
    rs.Command("_FilletCorners 0.08 ")

    CWC3 = act.MirrorObjectXZ(CWC1)
    CWC4 = act.MirrorObjectXZ(CWC2)

    ExtPathId = rs.AddLine([0, 0, 0], [Depth, 0, 0])

    CWC1s = rs.ExtrudeCurve(CWC1, ExtPathId)
    CWC2s = rs.ExtrudeCurve(CWC2, ExtPathId)
    CWC3s = rs.ExtrudeCurve(CWC3, ExtPathId)
    CWC4s = rs.ExtrudeCurve(CWC4, ExtPathId)

    rs.DeleteObjects([CWC1, CWC2, CWC3, CWC4, ExtPathId])

    return CWC1s, CWC2s, CWC3s, CWC4s
예제 #2
0
def _FuselageLongitudinalGuideCurves(NoseLengthRatio, TailLengthRatio):
    # Internal function. Defines the four longitudinal curves that outline the
    # fuselage (outer mould line).

    FSVU, FSVL = _AirlinerFuselageSideView(NoseLengthRatio, TailLengthRatio)
    FSVUCurve = rs.AddCurve(FSVU)
    FSVLCurve = rs.AddCurve(FSVL)

    AFPVPort, NoseEndX, TailStartX = _AirlinerFuselagePlanView(
        NoseLengthRatio, TailLengthRatio)

    # Generate plan view
    PlanPortCurve = rs.AddCurve(AFPVPort)

    # How wide is the fuselage?
    (Xmin, Ymin, Zmin, Xmax, Ymax, Zmax) = act.ObjectsExtents(PlanPortCurve)

    # Generate a slightly wider projection surface
    FSVMeanCurve = rs.MeanCurve(FSVUCurve, FSVLCurve)
    RuleLinePort = rs.AddLine((0, 0, 0), (0, -1.1 * abs(Ymax - Ymin), 0))
    FSVMCEP = rs.CurveEndPoint(FSVMeanCurve)
    AftLoftEdgePort = rs.CopyObject(RuleLinePort, FSVMCEP)
    ParallelLoftEdgePort = rs.CopyObject(FSVMeanCurve,
                                         (0, -1.1 * abs(Ymax - Ymin), 0))
    LSPort = rs.AddSweep2((FSVMeanCurve, ParallelLoftEdgePort),
                          (RuleLinePort, AftLoftEdgePort))

    # Project the plan view onto the mean surface
    PortCurve = rs.ProjectCurveToSurface(PlanPortCurve, LSPort, (0, 0, 100))

    # House-keeping
    rs.DeleteObjects([
        LSPort, PlanPortCurve, ParallelLoftEdgePort, RuleLinePort,
        AftLoftEdgePort
    ])

    # Tidy up the mean curve. This is necessary for a smooth result and removing
    # it can render the algorithm unstable. However, FitCurve itself may sometimes
    # be slightly unstable.
    FLength = abs(Xmax - Xmin)  # establish a reference length
    PortCurveSimplified = rs.FitCurve(PortCurve,
                                      distance_tolerance=FLength * 0.001)
    StarboardCurveSimplified = act.MirrorObjectXZ(PortCurveSimplified)

    rs.DeleteObject(PortCurve)

    # Compute the actual end points of the longitudinal curves
    (Xmin, Ymin, Zmin, Xmax1, Ymax,
     Zmax) = act.ObjectsExtents(StarboardCurveSimplified)
    (Xmin, Ymin, Zmin, Xmax2, Ymax,
     Zmax) = act.ObjectsExtents(PortCurveSimplified)
    (Xmin, Ymin, Zmin, Xmax3, Ymax, Zmax) = act.ObjectsExtents(FSVUCurve)
    (Xmin, Ymin, Zmin, Xmax4, Ymax, Zmax) = act.ObjectsExtents(FSVLCurve)
    EndX = min([Xmax1, Xmax2, Xmax3, Xmax4])

    return StarboardCurveSimplified, PortCurveSimplified, FSVUCurve, FSVLCurve, FSVMeanCurve, NoseEndX, TailStartX, EndX
def transonic_airliner(
    Propulsion=1,  # 1 - twin, 2 - quad 
    EngineDia=2.9,  # Diameter of engine intake highlight 
    FuselageScaling=[55.902, 55.902, 55.902],  # [x,y,z] scale factors
    NoseLengthRatio=0.182,  # Proportion of forward tapering section of the fuselage 
    TailLengthRatio=0.293,  # Proportion of aft tapering section of the fuselage
    WingScaleFactor=44.56,
    WingChordFactor=1.0,
    Topology=1,  # Topology = 2 will yield a box wing airliner - use with caution, this is just for demo purposes.
    SpanStation1=0.31,  # Inboard engine at this span station
    SpanStation2=0.625,  # Outboard engine at this span station (ignored if Propulsion=1)
    EngineCtrBelowLE=0.3558,  # Engine below leading edge, normalised by the length of the nacelle - range: [0.35,0.5]
    EngineCtrFwdOfLE=0.9837,  # Engine forward of leading edge, normalised by the length of the nacelle - range: [0.85,1.5]
    Scarf_deg=3):  # Engine scarf angle

    # Build fuselage geometry
    rs.EnableRedraw(False)
    try:
        FuselageOMLSurf, SternPoint = fuselage_oml.FuselageOML(
            NoseLengthRatio,
            TailLengthRatio,
            Scaling=FuselageScaling,
            NoseCoordinates=[0, 0, 0],
            CylindricalMidSection=False,
            SimplificationReqd=False)
    except:
        print "Fuselage fitting failed - stopping."
        return

    FuselageHeight = FuselageScaling[2] * 0.105
    FuselageLength = FuselageScaling[0]
    FuselageWidth = FuselageScaling[1] * 0.106
    rs.Redraw()

    if FuselageOMLSurf is None:
        print "Failed to fit fuselage surface, stopping."
        return

    FSurf = rs.CopyObject(FuselageOMLSurf)

    # Position of the apex of the wing
    if FuselageHeight < 8.0:
        WingApex = [0.1748 * FuselageLength, 0,
                    -0.0523 * FuselageHeight]  #787:[9.77,0,-0.307]
    else:
        WingApex = [0.1748 * FuselageLength, 0,
                    -0.1 * FuselageHeight]  #787:[9.77,0,-0.307]

    # Set up the wing object, including the list of user-defined functions that
    # describe the spanwise variations of sweep, dihedral, etc.
    LooseSurf = 1
    if Topology == 1:
        SegmentNo = 10
        Wing = liftingsurface.LiftingSurface(WingApex,
                                             ta.mySweepAngleFunctionAirliner,
                                             ta.myDihedralFunctionAirliner,
                                             ta.myTwistFunctionAirliner,
                                             ta.myChordFunctionAirliner,
                                             ta.myAirfoilFunctionAirliner,
                                             LooseSurf,
                                             SegmentNo,
                                             TipRequired=True)
    elif Topology == 2:
        SegmentNo = 101
        Wing = liftingsurface.LiftingSurface(WingApex,
                                             ta.mySweepAngleFunctionAirliner,
                                             bw.myDihedralFunctionBoxWing,
                                             ta.myTwistFunctionAirliner,
                                             ta.myChordFunctionAirliner,
                                             ta.myAirfoilFunctionAirliner,
                                             LooseSurf,
                                             SegmentNo,
                                             TipRequired=True)

    # Instantiate the wing object and add it to the document
    rs.EnableRedraw(False)
    WingSurf, ActualSemiSpan, LSP_area, RootChord, AR, WingTip = Wing.GenerateLiftingSurface(
        WingChordFactor, WingScaleFactor)
    rs.Redraw()

    if Topology == 1:
        # Add wing to body fairing
        WTBFXCentre = WingApex[
            0] + RootChord / 2.0 + RootChord * 0.1297  # 787: 23.8
        if FuselageHeight < 8.0:
            WTBFZ = RootChord * 0.009  #787: 0.2
            WTBFheight = 0.1212 * RootChord  #787:2.7
            WTBFwidth = 1.08 * FuselageWidth
        else:
            WTBFZ = WingApex[2] + 0.005 * RootChord
            WTBFheight = 0.09 * RootChord
            WTBFwidth = 1.15 * FuselageWidth

        WTBFlength = 1.167 * RootChord  #787:26

        WTBFXStern = WTBFXCentre + WTBFlength / 2.0

        CommS = "_Ellipsoid %3.2f,0,%3.2f %3.2f,0,%3.2f %3.2f,%3.2f,%3.2f %3.2f,0,%3.2f " % (
            WTBFXCentre, WTBFZ, WTBFXStern, WTBFZ, 0.5 *
            (WTBFXCentre + WTBFXStern), 0.5 * WTBFwidth, WTBFZ, 0.5 *
            (WTBFXCentre + WTBFXStern), WTBFheight)

        rs.EnableRedraw(False)

        rs.CurrentView("Perspective")
        rs.Command(CommS)
        LO = rs.LastCreatedObjects()
        WTBF = LO[0]
        rs.Redraw()

        # Trim wing inboard section
        CutCirc = rs.AddCircle3Pt((0, WTBFwidth / 4, -45),
                                  (0, WTBFwidth / 4, 45),
                                  (90, WTBFwidth / 4, 0))
        CutCircDisk = rs.AddPlanarSrf(CutCirc)
        CutDisk = CutCircDisk[0]
        rs.ReverseSurface(CutDisk, 1)
        rs.TrimBrep(WingSurf, CutDisk)
    elif Topology == 2:
        # Overlapping wing tips
        CutCirc = rs.AddCircle3Pt((0, 0, -45), (0, 0, 45), (90, 0, 0))
        CutCircDisk = rs.AddPlanarSrf(CutCirc)
        CutDisk = CutCircDisk[0]
        rs.ReverseSurface(CutDisk, 1)
        rs.TrimBrep(WingSurf, CutDisk)

    # Engine installation (nacelle and pylon)

    if Propulsion == 1:
        # Twin, wing mounted
        SpanStation = SpanStation1
        NacelleLength = 1.95 * EngineDia
        rs.EnableRedraw(False)
        EngineSection, Chord = act.CutSect(WingSurf, SpanStation)
        CEP = rs.CurveEndPoint(Chord)
        EngineStbd, PylonStbd = engine.TurbofanNacelle(
            EngineSection,
            Chord,
            CentreLocation=[
                CEP.X - EngineCtrFwdOfLE * NacelleLength, CEP.Y,
                CEP.Z - EngineCtrBelowLE * NacelleLength
            ],
            ScarfAngle=Scarf_deg,
            HighlightRadius=EngineDia / 2.0,
            MeanNacelleLength=NacelleLength)
        rs.Redraw()
    elif Propulsion == 2:
        # Quad, wing-mounted
        NacelleLength = 1.95 * EngineDia

        rs.EnableRedraw(False)
        EngineSection, Chord = act.CutSect(WingSurf, SpanStation1)
        CEP = rs.CurveEndPoint(Chord)

        EngineStbd1, PylonStbd1 = engine.TurbofanNacelle(
            EngineSection,
            Chord,
            CentreLocation=[
                CEP.X - EngineCtrFwdOfLE * NacelleLength, CEP.Y,
                CEP.Z - EngineCtrBelowLE * NacelleLength
            ],
            ScarfAngle=Scarf_deg,
            HighlightRadius=EngineDia / 2.0,
            MeanNacelleLength=NacelleLength)

        rs.DeleteObjects([EngineSection, Chord])

        EngineSection, Chord = act.CutSect(WingSurf, SpanStation2)
        CEP = rs.CurveEndPoint(Chord)

        EngineStbd2, PylonStbd2 = engine.TurbofanNacelle(
            EngineSection,
            Chord,
            CentreLocation=[
                CEP.X - EngineCtrFwdOfLE * NacelleLength, CEP.Y,
                CEP.Z - EngineCtrBelowLE * NacelleLength
            ],
            ScarfAngle=Scarf_deg,
            HighlightRadius=EngineDia / 2.0,
            MeanNacelleLength=NacelleLength)
        rs.Redraw()

    # Script for generating and positioning the fin
    rs.EnableRedraw(False)
    # Position of the apex of the fin
    P = [0.6524 * FuselageLength, 0.003, FuselageHeight * 0.384]
    #P = [36.47,0.003,2.254]55.902
    RotVec = rs.VectorCreate([1, 0, 0], [0, 0, 0])
    LooseSurf = 1
    SegmentNo = 200
    Fin = liftingsurface.LiftingSurface(P, tail.mySweepAngleFunctionFin,
                                        tail.myDihedralFunctionFin,
                                        tail.myTwistFunctionFin,
                                        tail.myChordFunctionFin,
                                        tail.myAirfoilFunctionFin, LooseSurf,
                                        SegmentNo)
    ChordFactor = 1.01  #787:1.01
    if Topology == 1:
        ScaleFactor = WingScaleFactor / 2.032  #787:21.93
    elif Topology == 2:
        ScaleFactor = WingScaleFactor / 3.5
    FinSurf, FinActualSemiSpan, FinArea, FinRootChord, FinAR, FinTip = Fin.GenerateLiftingSurface(
        ChordFactor, ScaleFactor)
    FinSurf = rs.RotateObject(FinSurf, P, 90, axis=RotVec)
    FinTip = rs.RotateObject(FinTip, P, 90, axis=RotVec)

    if Topology == 1:
        # Tailplane
        P = [0.7692 * FuselageLength, 0.000, FuselageHeight * 0.29]
        RotVec = rs.VectorCreate([1, 0, 0], [0, 0, 0])
        LooseSurf = 1
        SegmentNo = 100
        TP = liftingsurface.LiftingSurface(P, tail.mySweepAngleFunctionTP,
                                           tail.myDihedralFunctionTP,
                                           tail.myTwistFunctionTP,
                                           tail.myChordFunctionTP,
                                           tail.myAirfoilFunctionTP, LooseSurf,
                                           SegmentNo)
        ChordFactor = 1.01
        ScaleFactor = 0.388 * WingScaleFactor  #787:17.3
        TPSurf, TPActualSemiSpan, TPArea, TPRootChord, TPAR, TPTip = TP.GenerateLiftingSurface(
            ChordFactor, ScaleFactor)

    rs.EnableRedraw(True)

    rs.DeleteObjects([EngineSection, Chord])
    try:
        rs.DeleteObjects([CutCirc])
    except:
        pass

    try:
        rs.DeleteObjects([CutCircDisk])
    except:
        pass

    # Windows

    # Cockpit windows:
    rs.EnableRedraw(False)

    CockpitWindowTop = 0.305 * FuselageHeight

    CWC1s, CWC2s, CWC3s, CWC4s = fuselage_oml.CockpitWindowContours(
        Height=CockpitWindowTop, Depth=6)

    FuselageOMLSurf, Win1 = rs.SplitBrep(FuselageOMLSurf,
                                         CWC1s,
                                         delete_input=True)
    FuselageOMLSurf, Win2 = rs.SplitBrep(FuselageOMLSurf,
                                         CWC2s,
                                         delete_input=True)
    FuselageOMLSurf, Win3 = rs.SplitBrep(FuselageOMLSurf,
                                         CWC3s,
                                         delete_input=True)
    FuselageOMLSurf, Win4 = rs.SplitBrep(FuselageOMLSurf,
                                         CWC4s,
                                         delete_input=True)

    rs.DeleteObjects([CWC1s, CWC2s, CWC3s, CWC4s])

    (Xmin, Ymin, Zmin, Xmax, Ymax,
     Zmax) = act.ObjectsExtents([Win1, Win2, Win3, Win4])
    CockpitBulkheadX = Xmax

    CockpitWallPlane = rs.PlaneFromPoints([CockpitBulkheadX, -15, -15],
                                          [CockpitBulkheadX, 15, -15],
                                          [CockpitBulkheadX, -15, 15])

    CockpitWall = rs.AddPlaneSurface(CockpitWallPlane, 30, 30)

    if 'WTBF' in locals():
        rs.TrimBrep(WTBF, CockpitWall)

    rs.DeleteObject(CockpitWall)

    # Window lines
    WIN = [1]
    NOWIN = [0]

    # A typical window pattern (including emergency exit windows)
    WinVec = WIN + 2 * NOWIN + 9 * WIN + 3 * NOWIN + WIN + NOWIN + 24 * WIN + 2 * NOWIN + WIN + NOWIN + 14 * WIN + 2 * NOWIN + WIN + 20 * WIN + 2 * NOWIN + WIN + NOWIN + 20 * WIN

    if FuselageHeight < 8.0:
        # Single deck
        WindowLineHeight = 0.3555 * FuselageHeight
        WinX = 0.1157 * FuselageLength
        WindowPitch = 0.609
        WinInd = -1
        while WinX < 0.75 * FuselageLength:
            WinInd = WinInd + 1
            if WinVec[WinInd] == 1 and WinX > CockpitBulkheadX:
                WinStbd, WinPort, FuselageOMLSurf = fuselage_oml.MakeWindow(
                    FuselageOMLSurf, WinX, WindowLineHeight)
                act.AssignMaterial(WinStbd, "Plexiglass")
                act.AssignMaterial(WinPort, "Plexiglass")
            WinX = WinX + WindowPitch
    else:
        # Fuselage big enough to accommodate two decks
        # Lower deck
        WindowLineHeight = 0.17 * FuselageHeight  #0.166
        WinX = 0.1 * FuselageLength  #0.112
        WindowPitch = 0.609
        WinInd = 0
        while WinX < 0.757 * FuselageLength:
            WinInd = WinInd + 1
            if WinVec[WinInd] == 1 and WinX > CockpitBulkheadX:
                WinStbd, WinPort, FuselageOMLSurf = fuselage_oml.MakeWindow(
                    FuselageOMLSurf, WinX, WindowLineHeight)
                act.AssignMaterial(WinStbd, "Plexiglass")
                act.AssignMaterial(WinPort, "Plexiglass")
            WinX = WinX + WindowPitch
        # Upper deck
        WindowLineHeight = 0.49 * FuselageHeight
        WinX = 0.174 * FuselageLength  #0.184
        WinInd = 0
        while WinX < 0.757 * FuselageLength:
            WinInd = WinInd + 1
            if WinVec[WinInd] == 1 and WinX > CockpitBulkheadX:
                WinStbd, WinPort, FuselageOMLSurf = fuselage_oml.MakeWindow(
                    FuselageOMLSurf, WinX, WindowLineHeight)
                act.AssignMaterial(WinStbd, "Plexiglass")
                act.AssignMaterial(WinPort, "Plexiglass")
            WinX = WinX + WindowPitch

    rs.Redraw()

    act.AssignMaterial(FuselageOMLSurf, "White_composite_external")
    act.AssignMaterial(WingSurf, "White_composite_external")
    try:
        act.AssignMaterial(TPSurf, "ShinyBARedMetal")
    except:
        pass
    act.AssignMaterial(FinSurf, "ShinyBARedMetal")
    act.AssignMaterial(Win1, "Plexiglass")
    act.AssignMaterial(Win2, "Plexiglass")
    act.AssignMaterial(Win3, "Plexiglass")
    act.AssignMaterial(Win4, "Plexiglass")

    # Mirror the geometry as required
    act.MirrorObjectXZ(WingSurf)
    act.MirrorObjectXZ(WingTip)
    try:
        act.MirrorObjectXZ(TPSurf)
        act.MirrorObjectXZ(TPTip)
    except:
        pass
    if Propulsion == 1:
        for ObjId in EngineStbd:
            act.MirrorObjectXZ(ObjId)
        act.MirrorObjectXZ(PylonStbd)
    elif Propulsion == 2:
        for ObjId in EngineStbd1:
            act.MirrorObjectXZ(ObjId)
        act.MirrorObjectXZ(PylonStbd1)
        for ObjId in EngineStbd2:
            act.MirrorObjectXZ(ObjId)
        act.MirrorObjectXZ(PylonStbd2)

    rs.DeleteObject(FSurf)
    rs.Redraw()
예제 #4
0
def TurbofanNacelle(EngineSection,
                    Chord,
                    CentreLocation=[0, 0, 0],
                    ScarfAngle=3,
                    HighlightRadius=1.45,
                    MeanNacelleLength=5.67):
    # The defaults yield a nacelle similar to that of an RR Trent 1000 / GEnx

    HighlightDepth = 0.12 * MeanNacelleLength
    SectionNo = 100

    # Draw the nacelle with the centre of the intake highlight circle in 0,0,0
    rs.EnableRedraw(False)
    Highlight = rs.AddCircle3Pt((0, 0, HighlightRadius),
                                (0, -HighlightRadius, 0),
                                (0, 0, -HighlightRadius))
    HighlightCutterCircle = rs.AddCircle3Pt((0, 0, HighlightRadius * 1.5),
                                            (0, -HighlightRadius * 1.5, 0),
                                            (0, 0, -HighlightRadius * 1.5))

    # Fan disk for CFD boundary conditions
    FanCircle = rs.CopyObject(Highlight, (MeanNacelleLength * 0.25, 0, 0))
    FanDisk = rs.AddPlanarSrf(FanCircle)
    # Aft outflow for CFD boundary conditions
    BypassCircle = rs.CopyObject(Highlight, (MeanNacelleLength * 0.85, 0, 0))
    BypassDisk = rs.AddPlanarSrf(BypassCircle)
    rs.DeleteObjects([FanCircle, BypassCircle])

    # Outflow cone
    TailConeBasePoint = [MeanNacelleLength * 0.84, 0, 0]
    TailConeApex = [MeanNacelleLength * 1.35, 0, 0]
    TailConeRadius = HighlightRadius * 0.782
    TailCone = rs.AddCone(TailConeBasePoint, TailConeApex, TailConeRadius)
    # Spinner cone
    SpinnerConeBasePoint = [MeanNacelleLength * 0.26, 0, 0]
    SpinnerConeApex = [MeanNacelleLength * 0.08, 0, 0]
    SpinnerConeRadius = MeanNacelleLength * 0.09
    Spinner = rs.AddCone(SpinnerConeBasePoint, SpinnerConeApex,
                         SpinnerConeRadius)

    # Tilt the intake
    RotVec = rs.VectorCreate((0, 0, 0), (0, 1, 0))
    Highlight = rs.RotateObject(Highlight, (0, 0, 0), ScarfAngle, axis=RotVec)

    # Set up the disk for separating the intake lip later
    HighlightCutterCircle = rs.RotateObject(HighlightCutterCircle, (0, 0, 0),
                                            ScarfAngle,
                                            axis=RotVec)
    HighlightCutterDisk = rs.AddPlanarSrf(HighlightCutterCircle)
    rs.DeleteObject(HighlightCutterCircle)
    rs.MoveObject(HighlightCutterDisk, (HighlightDepth, 0, 0))

    # Build the actual airfoil sections to define the nacelle
    HighlightPointVector = rs.DivideCurve(Highlight, SectionNo)

    Sections = []
    TailPoints = []
    Rotation = 0
    Twist = 0
    AirfoilSeligName = 'goe613'
    SmoothingPasses = 1

    for HighlightPoint in HighlightPointVector:
        ChordLength = MeanNacelleLength - HighlightPoint.X
        Af = primitives.Airfoil(HighlightPoint, ChordLength, Rotation, Twist,
                                airconics_setup.SeligPath)
        AfCurve, Chrd = primitives.Airfoil.AddAirfoilFromSeligFile(
            Af, AirfoilSeligName, SmoothingPasses)
        rs.DeleteObject(Chrd)
        P = rs.CurveEndPoint(AfCurve)
        list.append(TailPoints, P)
        AfCurve = act.AddTEtoOpenAirfoil(AfCurve)
        list.append(Sections, AfCurve)
        Rotation = Rotation + 360.0 / SectionNo

    list.append(TailPoints, TailPoints[0])

    # Build the actual nacelle OML surface
    EndCircle = rs.AddInterpCurve(TailPoints)
    Nacelle = rs.AddSweep2([Highlight, EndCircle], Sections, closed=True)
    # Separate the lip
    Cowling, HighlightSection = rs.SplitBrep(Nacelle, HighlightCutterDisk,
                                             True)

    # Now build the pylon between the engine and the specified chord on the wing
    CP1 = [
        MeanNacelleLength * 0.26 + CentreLocation[0], CentreLocation[1],
        CentreLocation[2] + HighlightRadius * 0.1
    ]
    CP2 = [
        MeanNacelleLength * 0.4 + CentreLocation[0], CentreLocation[1],
        HighlightRadius * 1.45 + CentreLocation[2]
    ]
    CP3 = rs.CurveEndPoint(Chord)
    rs.ReverseCurve(Chord)
    CP4 = rs.CurveEndPoint(Chord)

    # Move the engine into its actual place on the wing
    rs.MoveObjects(
        [HighlightSection, Cowling, FanDisk, BypassDisk, TailCone, Spinner],
        CentreLocation)

    # Pylon wireframe
    PylonTop = rs.AddInterpCurve([CP1, CP2, CP3, CP4])
    PylonAf = primitives.Airfoil(CP1, MeanNacelleLength * 1.35, 90, 0,
                                 airconics_setup.SeligPath)
    PylonAfCurve, PylonChord = primitives.Airfoil.AddNACA4(
        PylonAf, 0, 0, 12, 3)
    LowerTE = rs.CurveEndPoint(PylonChord)
    PylonTE = rs.AddLine(LowerTE, CP4)

    # Create the actual pylon surface
    PylonLeft = rs.AddNetworkSrf([PylonTop, PylonAfCurve, PylonTE])
    rs.MoveObject(PylonLeft, (0, -CentreLocation[1], 0))
    PylonRight = act.MirrorObjectXZ(PylonLeft)
    rs.MoveObject(PylonLeft, (0, CentreLocation[1], 0))
    rs.MoveObject(PylonRight, (0, CentreLocation[1], 0))
    PylonAfCurve = act.AddTEtoOpenAirfoil(PylonAfCurve)
    PylonAfSrf = rs.AddPlanarSrf(PylonAfCurve)

    # Assigning basic surface properties
    act.AssignMaterial(Cowling, "ShinyBABlueMetal")
    act.AssignMaterial(HighlightSection, "UnpaintedMetal")
    act.AssignMaterial(TailCone, "UnpaintedMetal")
    act.AssignMaterial(FanDisk, "FanDisk")
    act.AssignMaterial(Spinner, "ShinyBlack")
    act.AssignMaterial(BypassDisk, "FanDisk")
    act.AssignMaterial(PylonLeft, "White_composite_external")
    act.AssignMaterial(PylonRight, "White_composite_external")

    # Clean-up
    rs.DeleteObject(HighlightCutterDisk)
    rs.DeleteObjects(Sections)
    rs.DeleteObject(EndCircle)
    rs.DeleteObject(Highlight)
    rs.DeleteObjects([PylonTop, PylonAfCurve, PylonChord, PylonTE])

    rs.Redraw()

    TFEngine = [
        Cowling, HighlightSection, TailCone, FanDisk, Spinner, BypassDisk
    ]
    TFPylon = [PylonLeft, PylonRight, PylonAfSrf]

    return TFEngine, TFPylon