Board index FlightGear Support Interfacing

Convert .ac files to .svg

Connecting two computers, using generic protocol, connecting with Matlab?

Convert .ac files to .svg

Postby dhudach » Sun Jun 23, 2019 12:21 am

I'm trying to convert .ac files to .svg for a webpanel interface experiment. I cannot figure out how to read the .ac file. I have tried blender and some of the py addons. I'm running blender 2.76b. I installed two of the recommended addons (io_scene_ac, io_scene_ac3d). I can enable them in blender user preferences. When I open a file and select Import with either one of the above addons, I see the .ac file and open it but I get nothing at all that resembles the object I should be seeing. In other words, I doubt seriously that blender is converting the ac file correctly or at all. I just see a cube with the small circle inside. Hmmm, this shouldn't be this difficult !!! Any help would be much appreciated ... first reading in the .ac file then exporting it to .svg. If there is another utility or program that I should use rather than blender, let me know. I'm running linux Mint ... if that helps. Thanks
Flight Instruction Elevator Control: pull back = houses get smaller, push forward = houses get bigger.
dhudach
 
Posts: 118
Joined: Tue Apr 14, 2015 12:46 am

Re: Convert .ac files to .svg

Postby simone04 » Sun Jun 23, 2019 7:06 am

You should figure out also how to convert the ac3d to svg...
Now as the wiki says: http://wiki.flightgear.org/Blender
Note: An importer/exporter for FlightGear's most common 3D format (AC3D, .ac) is only included in Blender version 2.49b or older.

If you want to use blender for converting ac3d you should use blender 2.49b or older(I used 2.49b for one of my project and worked pretty well)
Other newer versions of blender require a special addon (and sometimes just won't work)
So you have 3 alternatives:
1- Use blender 2.49b to import your ac3d file(but then I don't know how to export in svg file)
2- Use newer version of blender (with the addon)
3- Use another program.
There is another program that is more "user-friendly", its name is AC3D and you can download it from here: https://www.inivis.com/
( is not free but you can download the 14 day trial)
(again I don't know if there is an option for exporting your model from ac3d to svg) (also because you are trying to convert from 3d to 2d)
simone04
 
Posts: 65
Joined: Tue May 28, 2019 6:58 pm
Location: Italy
Callsign: MR-BEAN
Version: 2020.1.1
OS: Ubuntu 18.04.4 LTS

Re: Convert .ac files to .svg

Postby CaptB » Sun Jun 23, 2019 8:45 am

In Blender, Import .ac -> export to DXF -> In Inkscape, import DXF -> save SVG
Ongoing projects(3D modelling): A320, MD-11, A350, B767
FG767: https://fg767.wordpress.com/
CaptB
 
Posts: 685
Joined: Thu May 23, 2013 7:36 pm
Callsign: EKCH_AP
IRC name: CaptB
Version: next
OS: Xubuntu

Re: Convert .ac files to .svg

Postby simone04 » Sun Jun 23, 2019 9:08 am

CaptB wrote in Sun Jun 23, 2019 8:45 am:In Blender, Import .ac -> export to DXF -> In Inkscape, import DXF -> save SVG

Good to know
simone04
 
Posts: 65
Joined: Tue May 28, 2019 6:58 pm
Location: Italy
Callsign: MR-BEAN
Version: 2020.1.1
OS: Ubuntu 18.04.4 LTS

Re: Convert .ac files to .svg

Postby Gijs » Sun Jun 23, 2019 9:28 am

dhudach wrote in Sun Jun 23, 2019 12:21 am: I just see a cube with the small circle inside.

Try removing the cube before importing the .ac. The cube is Blender's default object when starting a new file. You can remove the cube and click File > Save Startup File to make the empty scene the new default (that way you don't have to remove the cube everytime you start a new model).
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9544
Joined: Tue Jul 03, 2007 3:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: Convert .ac files to .svg

Postby Alant » Sun Jun 23, 2019 10:04 am

I am confused.
.ac is a 3d file format.
.svg is a 2d file format.
What are you trying to do? Do you want just one 2d face of a 3d object ?

Alan
Alant
 
Posts: 1219
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

Re: Convert .ac files to .svg

Postby dhudach » Sun Jun 23, 2019 10:11 am

I tried removing the cube, but the problem is there is no image of the object, before or after I remove the cube. I saw some posts that stated that to import the .ac files I would need an addon. I installed one of them which doesn't work and found another which again, doesn't work.

Ok, I can see the basic problem - trying to convert the 3d down to 2d.

So I guess the solution is to manually create the 2d .svg file by hand (inkscape or something like that). But it would be nice to be able to view the .ac file somehow to see exactly what it should look like, other than starting the simulator and looking at it (for example, adf or clock). What does FG use to render the .ac files when it runs? My guess is that the conversion is in one of the libraries.

I did see that there is a non-free application that can do this. I might try the 14 day trial.

Thanks for the input, I'll see what I can figure out.
Flight Instruction Elevator Control: pull back = houses get smaller, push forward = houses get bigger.
dhudach
 
Posts: 118
Joined: Tue Apr 14, 2015 12:46 am

Re: Convert .ac files to .svg

Postby Alant » Sun Jun 23, 2019 10:38 am

The 3d object that you are trying to convert will have an image file associated. This file is used to paint the surfaces of the object.
Is your file part of FGAddon - if so let us know where it is and what you want to have in your svg file.
Alan
Alant
 
Posts: 1219
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

Re: Convert .ac files to .svg

Postby dhudach » Sun Jun 23, 2019 2:31 pm

I may be taking the 'scenic' route to explain this .... But, my goal is to implement numerous instruments in webpanel for the SenecaII. I currently have fgpanel set up with quite a few instruments and I want to see if I can get the same instruments and behavior on webpanel. For the SenecaII, there are only a few instruments implemented in the webpanel directory, pretty much enough to demonstrate the capability of webpanel: AI,ALT,ASI,HSI,RPM,TC,VSI. I'm starting off looking at some of the other instruments used in the SenecaII panel, adf, clock and others that are in Aircraft/Instruments-3d.

The short answer is that I'm not exactly sure which ones I want to implement. As I work my way through it could be any or almost all of the ones on the panel. I'm currently working on the manifold pressure gauge. I started with the rgb images, converted them to svg and am using inkscape to create the needles. If I can get this working in webpanel, it lays the foundation for me to do others. And so at this point, I'm ok if I can't convert .ac to .svg. But it would be nice to be able to open up the .ac file to see what it looks like much the same way I have the manifold pressure gauge rgb file open as a reference as I work on the .svg.

The goal is to use fgpanel or webpanel to render my cockpit instruments, most likely using Raspberry Pi. Webpanel is an attractive solution because it doesn't force me to build fgpanel on the Pi device and configuration and layout can occur within FG rather than dropping configuration files onto the Raspberry Pi for fgpanel changes.

Ok, I guess that really wasn't the short answer ... !!
Flight Instruction Elevator Control: pull back = houses get smaller, push forward = houses get bigger.
dhudach
 
Posts: 118
Joined: Tue Apr 14, 2015 12:46 am


Return to Interfacing

Who is online

Users browsing this forum: No registered users and 1 guest