You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Ale <al...@gmail.com> on 2018/07/26 10:45:41 UTC

Working with DXF Files in Adobe AIR

Hi,

I need to show a DXF file in an Adobe AIR application. What I have seen is
that I will probably have to convert it to a suitable file type such as FXG
for Flex. I wonder if there is any library or something to make this
conversion.

It would be fine any other ideas instead of libraries for conversion having
in mind that what I need is to show the content of DXF file into my
application.

Thanks,

Ale



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/

Re: Working with DXF Files in Adobe AIR

Posted by Olaf Krueger <ma...@olafkrueger.net>.
>Sounds a long-shot though ;-) 

If you need a starting point on how to provide dxf2svg as a service, maybe
this [1] helps.
This is a simple NodeJS/Restify implementation in order to provide the
"Apache Royale Compiler" as-a-service. The Readme [2] explains how it works.
Notice that the code is just a proof of concept and that it's still work in
progress.

However, I guess you could easily replace the Royale command with the
related dxf2svg command.
Of course, you have to do some more adjustments but in the best case, this
could be done in a couple of minutes ;-)

HTH,
Olaf

[1]
https://github.com/apache/royale-website/blob/try-it-now/try-it-now/server/server.js
[2]
https://github.com/apache/royale-website/blob/try-it-now/try-it-now/server/README.md




--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/

Re: Working with DXF Files in Adobe AIR

Posted by Javier Guerrero García <ja...@gmail.com>.
The "runtime" requirement sounds a bit strange (not knowing anything about
your app), since it would involve something generating/updating a DXF in
realtime while your app needs to access it (otherwise, you could perform
your conversion.

If you do need that realtime, I would go for server side scripting with
LibreDWG as Olaf suggested (it has a dxf2svg converter indeed:
https://github.com/LibreDWG/libredwg/blob/master/programs/dwg2SVG.c) or
something similar, and then send the generated SVG to your app as a
response.

Sounds a long-shot though ;-)

On Fri, Jul 27, 2018 at 10:16 AM, Ale <al...@gmail.com> wrote:

> Hi Javier,
>
> Thanks for your reply.
>
> I guess SVG is a good format to convert for using it in the application.
> The
> main problem is that I need to make this conversion at runtime. That is why
> I think I would need some external library that helps me out doing it.
>
> I have also thought about getting the DXF file into any kind of bitmap
> representation but I just don't know how I could do that with Flex/AS3
> language.
>
> Thanks,
>
> Ale
>
>
>
> --
> Sent from: http://apache-flex-users.2333346.n4.nabble.com/
>

Re: Working with DXF Files in Adobe AIR

Posted by Olaf Krueger <ma...@olafkrueger.net>.
Maybe I should add some more words to my last post:
If you don't find an "AS3 DXF converter implementation" out there I guess
you have at least those options:

- Grab one of those libs out there, put it on a server and deliver it
as-a-service
- Grab one of those libs out there, install/deploy it locally and try to
call it from your AIR app
- Consume an external service which is already there

HTH,
Olaf





--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/

Re: Working with DXF Files in Adobe AIR

Posted by Olaf Krueger <ma...@olafkrueger.net>.
Maybe something like this helps:

[1] https://github.com/smidyo/vectorexpress-api
[2] https://github.com/LibreDWG/libredwg

Olaf



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/

Re: Working with DXF Files in Adobe AIR

Posted by Ale <al...@gmail.com>.
Hi Javier,

Thanks for your reply.

I guess SVG is a good format to convert for using it in the application. The
main problem is that I need to make this conversion at runtime. That is why
I think I would need some external library that helps me out doing it. 

I have also thought about getting the DXF file into any kind of bitmap
representation but I just don't know how I could do that with Flex/AS3
language.

Thanks,

Ale



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/

Re: Working with DXF Files in Adobe AIR

Posted by Javier Guerrero García <ja...@gmail.com>.
There are plenty of DXF->SVG conversion tools: https://www.dxfconverter.org/

Surely you won't have much trouble rendering the SVG in your app and retain
full vector resolution if you need to, but it could be slow to render. You
might also want consider rendering the DXF as a bitmap at your top device
resolution, and just placing it in your app (if you set a maximum zoom to
match 1:1 device resolution with the bitmap resolution, there shouldn't be
much difference either way).

On Thu, Jul 26, 2018 at 12:45 PM, Ale <al...@gmail.com> wrote:

> Hi,
>
> I need to show a DXF file in an Adobe AIR application. What I have seen is
> that I will probably have to convert it to a suitable file type such as FXG
> for Flex. I wonder if there is any library or something to make this
> conversion.
>
> It would be fine any other ideas instead of libraries for conversion having
> in mind that what I need is to show the content of DXF file into my
> application.
>
> Thanks,
>
> Ale
>
>
>
> --
> Sent from: http://apache-flex-users.2333346.n4.nabble.com/
>