(written from a Production point of view)
The Deep Space Station K-7 was the very first free-floating space bound construction, not being a starship, ever seen in the Star Trek franchise. Despite its signature design features as a space station, having made its debut as DS K-7 in the second season Star Trek: The Original Series episode, "The Trouble with Tribbles", stock footage of the station was only once re-utilized to represent Starbase 6 in the original airing of The Original Series, and has not been re-utilized since. Its appearance in the spin-off series' episode "Trials and Tribble-ations" from Star Trek: Deep Space Nine, was a homage to the original appearance, and not an embellishment to the Star Trek lore. The 2006 remastered version of the Original Series nixed even its original appearance as Starbase 6, since that structure was for the occasion completely re-imagined. That left the Deep Space Station K-7 as is, being featured in "The Trouble with Tribbles" as the only space station of this particular, canonically established, design.
True to form, Production Designer Matt Jefferies, upon receiving the script, started to beef out design ideas for the space station. Interestingly enough, as his preliminary design sketches showcased, Jeffries considered something akin to a habitat or docking ring attached to a central core, a notion that did became a prominent feature on the later Deep Space 9 space station, the namesake of the spin-off series, Deep Space Nine. However, what he was working on at the time differed radically from what was eventually seen on-screen. Jefferies was cut short by his boss, Gene Roddenberry, who, at the time, had connections at the Douglas Aircraft Company, and was able to procure one of their space station concepts. In the end, the eventual Deep Space Station K-7 was to be based on a concept model for a real-life space station/moon base concept, proposed by Douglas Aircraft as early as 1960 for NASA. Intended to be housed in the top stage of the Saturn 1B or Saturn V rocket, it was designed to deploy like an inflatable balloon. Concept models and concept art of the Douglas inflatable space station are featured on the PROJECT RHO Reference website and on Datin's website.
Jefferies sold off his original preliminary design sketches as Lot 144, with an estimate of US$200-$300, in The Star Trek Auction of 12 December 2001, in order to raise funds for the "Motion Picture and Television Fund".
Original studio model Edit
In 1967 Roddenberry managed to acquire one of the Douglas Aircraft concept models. The Howard Anderson Company called in Richard C. Datin, Jr. to do modifications on the model for it to become K-7. As Datin remembered, "(...)I don't believe the revisions were based on any drawings, just following instructions given to me, I think by Jefferies. In other words, I had a more or less free hand in revising the model as long as it would stand up to the rigors of filming, be credible, and make any last alterations/additions to suit their needs. I haven't the remotest idea that any drawings existed...possibly a couple of hand-drawn sketches furnished by Matt may have been it."
On modifying the Douglas model Datin recalled:
"I vaguely recall it was either an off-white, dull of course, or very similar to the light gray/green Enterprise color. The model was composed of a material very unfamiliar to me. In perspective, more distinct than other substances from those days, it was a strange material. It was soft, yet resilient, but a rubbery substance, more foam-like but dense enough to hold its shape an be worked satisfactorily by machines. Each of the components, or satellite sections, were cast in this material and the alterations consisted of replacing the existing rods that held them together with Plexiglas tubing to allow electrical wiring to pass through to each other. Looking at the parts purchased for the alteration job, it looks as though I added some dome-like Plexiglas pieces to the satellites-most likely to alter their appearance sufficiently from the original Douglas design." (Star Trek: Communicator issue 133, pp. 49-50)On operating the model (when mounted on a pipe from the bottom, serving as a center support and hiding the electrical wiring) on 1 and 5 September 1967, "(...)At Howard Anderson's, during filming, I sat under it and rotated it and turned lights on and off. Then I was matted out of the shot(...)" (Cinefantastique, Vol.27, No.11/12, p. 68) The markings on the model read "United Federation of Planets" on the main section, "K-A","K-B" and "K-C" on the cones of the three circular pods and "K-7" on the central cone.
Datin modified the model from 19 to 29 August 1967 at a total cost of $688, including his fee for operating the model. (Star Trek: Communicator issue 133, p. 50) This proved to be his last involvement with Star Trek. Debuting in TOS: "The Trouble with Tribbles", this space station design was the only one ever used in original version of The Original Series. Stock footage of the K-7 space station was later seen in the original version of "The Ultimate Computer" to represent another space station, Starbase 6.
The studio model built for The Original Series has been missing for decades, either lost or destroyed.
Trials and Tribble-ations model Edit
In 1996, a new model was built by Greg Jein for use in Deep Space Nine's tribute episode, "Trials and Tribble-ations". Built not from original blueprints, but from detail gleaned from watching the original show and by studying the few existing production photos and blow-ups from stills from the original episode. Not only Jein studied the original footage in detail, other production staffers too scrutinized the footage for details, like Doug Drexler and Mike Okuda, stunned to discover a cone-shaped structere attached to the back of the central saucer, "The biggest surprise to Mike and I, was the “hopper” on the back of the main saucer. It was completely out of view in the TOS episode." wbm Greg Jein recreated the station down to details that were never visible in that episode, like the cone-shaped structure on the back, a strobe light on the bottom, rotating pods and the block letters that read K-7. Jein explained,
"Fortunately, the clarity of detail revealed by the newly transferred original footage of "The Trouble with Tribbles" proved useful. The art department sent over a drawing that they'd made of the station, Then we made some modifications based on color prints made from the original negative, which we felt were faithful to the original design. And we sort of winged it from there.[remark: after lathe turning wood for the towers and purchasing "standard architectural material" for the tubes] Then we made molds and cast them, cut the windows out, and put neon inside."(The Magic of Tribbles: The Making of Trials and Tribble-ations, p. 42)After receiving the model, Visual Effects Supervisor Gary Hutzel recalled:"The model came over and it had these big block letters K-7 on top. It looked so goofy. It didn't look anything like the original. We powered it up, turned on the lights, and it looked exactly like the original. The big K-7 went away, because the windows hid it" (Cinefantastique, Vol.29, No.6/7, p.70). The model featured new elements, including the spacecraft in a detailed shuttlebay wbm. That item came from one of Jein's co-workers, Jason Kaufman, who expressed a desire to "mess around". What he came up with was a detailed miniature shuttle-bay outfitted with a NCC-K7 shuttlecraft and the Cyrano Jones' Spacematic, completely built from scratch, essentially from bits and pieces lying around Jein's model shop. (The Magic of Tribbles: The Making of Trials and Tribble-ations, p. 43)
Upon completion, the model was sent over to Image G, together with he other models, made for the episode, for filming. Gary Hutzel sent for art department staffers Doug Drexler and Michael Okuda, do perform some final fine tuning detail work on the models, as Drexler recalled, "Whenever Gary Hutzel put a starship on the motion control stand, he always gave us a courtesy call. He knew we loved the ships. But this day was something special however...Gary had requested to Mike that we stop over for a work related reason as well, and that was to on the spot weather the ship to camera's taste. Oh man, was that great fun. wbm(...)Gary felt that they could use some additional weathering and panel lines. Naturally we were totally stoked." wbm
Unaware of Datin's stint at Howard Anderson Company back in 1967, Doug Drexler also discovered the rotating motion and had Larry DeUnger of Boss Film Studios repeat the action. (The Magic of Tribbles: The Making of Trials and Tribble-ations, pp. 44-45}
The last time this filming model was seen, was in storage at Image G, where the motion control photography was performed for the episode , but like its progenitor, its current whereabouts are unknown as the model has not been sighted since.
CGI model Edit
Yet another version of K-7, this time rendered digitally, was used for the 2006 remastered version of the "The Trouble with Tribbles" at CBS Digital, where digital animators worked with the model under the supervision of Niel Wray and David Rossi, for representation of the station in its respective episode. The model was built by Finnish fan and digital modeler Petri Blomqvist, and was bought from him by CBS Television Studios for use in the series. Blomqvist's work was brought to the attention of Wray and Visual Effects Supervisor Michael Okuda by Technical Consultant Gary Kerr. The quality of his work was a compelling reason for the acquisition, as it saved valuable production time. Nevertheless, the digital animators still had their work cut out for them as Blomqvist's model was constructed in the LightWave 3D software, whereas they used the Autodesk Maya CGI software at the time, and had to translate the digital model from one format into the other, which inevitably led to some information loss. Additionally, they had to cut down on the resolution level of Blomqvist's highly detailed high-resolution model, in order to speed up computer rendering time. It, and the other models CBS bought from him for the project, has earned Blomqvist an official "Technical Consultant" credit. (Sci-fi & fantasy modeller, Vol. 26, p. 49-50) Kerr, incidentally, provided additional reference material in order for the animators to finetune the model.  Though the K-7 doubled as Starbase 6 in the original airing of "The Ultimate Computer", for the 2008 remastering of that episode, that station was retconned with an entirely new design, that was entirely built at CBS Digital.
Blomqvist's model had actually already made an official appearance in 2001, when it was featured as an illustration in Star Trek: Communicator issue 133, pp. 44-45.
Two years before the remastered project, Drexler, under his nome de guerre "Max Rem", also constructed a CGI model of the K-7 space station for use in James Cawley's non-profit Internet fan film series Star Trek: New Voyages. wbm Though it was eventually not featured there, parts of his model did turn up in, and on licensed print publications like the Star Trek: Ships of the Line calendars wbm and their book derivatives.