# SOLIDWORKS files into RockSim?

### Help Support The Rocketry Forum:

#### tcbetka

##### Member
Hello all...

Does anyone have any experience designing with SolidWorks, and then exporting parts in a format that can be imported into RockSim or OpenRocket?

I've been perusing the forum here, as well as the Internet in general, and haven't really come across anything like this yet. I did find an old thread here in TRF about the XML nature of the RS file--but nothing about converting a SW file into any sort of format that OpenRocket (or RS) can understand.

Does anyone have any experience doing anything like this?

Thanks in advance!

TB

#### Nytrunner

##### Pop lugs, not drugs
TRF Supporter
I've designed in SW for years, and highly doubt it can export to a Rocksim usable file.

But if you already have a cad file, you can use the measure tool to generate the parts pretty dang simply.

#### tcbetka

##### Member
I think you're right, judging from what I (haven't) found thus far. Would be cool, in this day and age of 3D printing and .stl files, if RS or OR could import them to use as design. Were I a better Java developer I might grab the source files for OR and give it a whirl. Too bad the thing isn't written in C++, because I'd do much better with that.

Thanks for the post.

TB

#### dhbarr

##### Amateur Professional
I think you're right, judging from what I (haven't) found thus far. Would be cool, in this day and age of 3D printing and .stl files, if RS or OR could import them to use as design. Were I a better Java developer I might grab the source files for OR and give it a whirl. Too bad the thing isn't written in C++, because I'd do much better with that.

Thanks for the post.

TB
ORK is just XML. I assume SW has some flavor of XML export as well, so a relatively simple transformation w/bounds checking should be somewhat simple. I wouldn't be surprised to see BNF work.

The remainder is, of course, left as an exercise to the reader

#### GregGleason

##### Well-Known Member
ORK is just XML. I assume SW has some flavor of XML export as well, so a relatively simple transformation w/bounds checking should be somewhat simple. I wouldn't be surprised to see BNF work.

The remainder is, of course, left as an exercise to the reader
This.

I think you are better off trying to get something into OpenRocket. You can put some simple fins into an OR file and then look at the .xml and then back-engineer a script from SW that works in OR. Keep in mind it is just the fin vertex data for one fin, that you then replicate in OR "x" number of times. AFAIK, there is no fin airfoil data that can be exported. That is more of the domain of CFD applications.

Greg

#### dr wogz

##### Fly caster
I kinda wish it went the other way.. RS or ORK files / parts into STEP or IGES or STP files.. or even Parasolid.. to pull into a 3D CAD program..

#### djkingsley

##### Well-Known Member
I wrote a plugin for rhino that opens an openrocket file, and generates the 3D geometry. So far the plugin can read the first stage in the file and generate nosecones, body tubes, couplers, bulkheads, centering rings, motor tubes, and fins.

https://github.com/dkingsley/RhinoORK. It requires rhino and visual studio community edition to compile it.

#### GregGleason

##### Well-Known Member
I wrote a plugin for rhino that opens an openrocket file, and generates the 3D geometry. So far the plugin can read the first stage in the file and generate nosecones, body tubes, couplers, bulkheads, centering rings, motor tubes, and fins.

https://github.com/dkingsley/RhinoORK. It requires rhino and visual studio community edition to compile it.
Thanks for the link. Does it work with Rhino 4?

Greg

#### djkingsley

##### Well-Known Member
The plugin is for rhino 5. There are some significant differences between the rhino 4 and 5 .net sdk's so I am not sure how much effort would be needed to support rhino 4.

Thanks.

Greg

#### caveduck

##### semi old rocketeer
I'd like to see a round-trip capability, but my primary interest would be to get away from the very limited CAD features of OR etc. and use a good design program with subassemblies, parts and materials libraries, versioning, flexible metadata, and graphic rendering. Blender comes to mind as it's free, open source, and *very* capable. SolidWorks is of course the gold standard but is really expensive if you don't have access at work.

The actual flight simulation engine is not really very large and could be integrated into any 3D software having a plugin architecture. All you really need is an ODE integrator (better than Runge-Kutta please), force derivative evaluator with Barrowman CP/drag, gravity and atmosphere models, and an outer N-variable minimizer/optimizer. Most of that exists in open source. Overall the flight module should probably be under 5K lines of code. (FWIW I have prior professional experience with 6DOF satellite and rocket motion integrators so I've got a good idea of the code needed). The only tricky part is that from a general 3D model you have to either designate or (for major bonus points) have the flight sim module figure out which parts are to be considered aerodynamically significant.

#### tcbetka

##### Member
If you are a member of the Experimental Aviation Association, you get the student version of SOLIDWORKS as part of the membership. The normal membership cost is $40, I think I paid. I purchased SW Professional after using the student version a while, as I use it for mechanical design in my small business. But you're right about the cost--it was PRICEY, and every year you get to fork out about$1500 for a maintenance agreement. It doesn't even pay to let that last for a year or two anymore, as now they're making you pay it in arrears if/when you want to upgrade to a later version in the future. So as long as I can do design work with the software, I guess I'll keep up with the subscription.

That being said, a plug-in for SW would be very cool...but I haven't even scratched the surface on development for something like that yet. How does Rhino 4/5 compare to SW? I'll check out some YouTube videos on it--maybe it would be worthwhile to download the free trial to check out Dennis' plugin.

Thanks all.

TB

#### ttabbal

##### Well-Known Member
It's cloud based, but onshape has free accounts for open designs. Your files are accessible to everyone to read/copy, but if you don't mind that it's pretty good. There's even an Android app that works well.

Sent from my Nexus 6 using Tapatalk

#### JP Johnston

##### roguextech
Hey y'all,

Nearly four years later, I am quite interested in creating an add-in to import OpenRocket files into SolidWorks and vice versa. I was just able to compile RhinoORK and import the DLL file into Rhino 5. It still works to this day!

Any ideas, comments, etc. would be greatly appreciated even if the comments are from the naysayers...

JP Johnston ME CSWP
Rogue Exploration Technologies

#### Jeff Lassahn

##### Well-Known Member
TRF Supporter
I expect the round trip problem is not solvable in the general case.
OpenRocket can't represent or simulate arbitrary 3D geometry, it only knows how to work with a limited set of shapes -- cones, ogives, cylindrical tubes, etc. any designs that aren't built out of those primitives can't be represented in OpenRocket.

#### JP Johnston

##### roguextech
I am aware of the limitations of OpenRocket however, SolidWorks is pretty much able to do as the developer wishes. I think I can come up with a viable solution to read/convert from the ORK file and then convert/write to the ORK file.

#### Jeff Lassahn

##### Well-Known Member
TRF Supporter
I'm curious what your strategy will be for going from SolidWorks to OpenRocket. Is it something you can summarize?

#### JP Johnston

##### roguextech
While I have been thinking about this for sometime now, I have not put pencil to paper as yet. I know a little about the ORK file spec and I am thinking that I can read the "parts" in the ORK and use premade sldprt's <similar to weldment profiles in SWX> that will be driven by a SWX design table, which is nothing more than an Excel spreadsheet. We use the same idea for driving fasteners to give a more common example.

I created a SWX design table to drive a model for a hypersonic research vehicle that was in turn driven by optimization routines in a piece of software called STAR-CCM+.

Obviously the software will not be quite as complicated. <crosses fingers>

#### Jeff Lassahn

##### Well-Known Member
TRF Supporter
That makes sense, it seems like something of that general style should work.
But that's from OpenRocket to SolidWorks. I'm much more worried about how hard going the other direction would be.

#### JP Johnston

##### roguextech
I think it will be fairly straight forward. Just reversing the process.

If this all works out, I am thinking of using OpenRocket to do the optimization of the vehicle in SWX...