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 » Sat Jun 22, 2019 11:21 pm

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
dhudach
 
Posts: 75
Joined: Mon Apr 13, 2015 11:46 pm

Re: Convert .ac files to .svg

Postby simone04 » Sun Jun 23, 2019 6: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: 28
Joined: Tue May 28, 2019 5:58 pm
Location: Italy
Callsign: MR-BEAN
Version: 2018.3.2
OS: Ubuntu 18.04.1 LTS

Re: Convert .ac files to .svg

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

In Blender, Import .ac -> export to DXF -> In Inkscape, import DXF -> save SVG
CaptB
 
Posts: 542
Joined: Thu May 23, 2013 6:36 pm
Callsign: EKCH_AP
IRC name: CAPTB
Version: 2018.1
OS: Xubuntu, Win7 64

Re: Convert .ac files to .svg

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

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

Good to know
simone04
 
Posts: 28
Joined: Tue May 28, 2019 5:58 pm
Location: Italy
Callsign: MR-BEAN
Version: 2018.3.2
OS: Ubuntu 18.04.1 LTS

Re: Convert .ac files to .svg

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

dhudach wrote in Sat Jun 22, 2019 11:21 pm: 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: 9380
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: Convert .ac files to .svg

Postby Alant » Sun Jun 23, 2019 9: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: 913
Joined: Wed Jun 23, 2010 5:58 am
Location: Portugal
Callsign: Tarnish99
Version: from Git
OS: Windows 10

Re: Convert .ac files to .svg

Postby dhudach » Sun Jun 23, 2019 9: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.
dhudach
 
Posts: 75
Joined: Mon Apr 13, 2015 11:46 pm

Re: Convert .ac files to .svg

Postby Alant » Sun Jun 23, 2019 9: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: 913
Joined: Wed Jun 23, 2010 5:58 am
Location: Portugal
Callsign: Tarnish99
Version: from Git
OS: Windows 10

Re: Convert .ac files to .svg

Postby dhudach » Sun Jun 23, 2019 1: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 ... !!
dhudach
 
Posts: 75
Joined: Mon Apr 13, 2015 11:46 pm


Return to Interfacing

Who is online

Users browsing this forum: MSN [Bot] and 1 guest