Help with XML file for curved line import
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
-
- Posts: 5
- Joined: Fri Mar 31, 2023 7:05 am
Help with XML file for curved line import
Hi, I have an XML file which describes a curved line in 3D space. Is there a simple way (or hard) to import this XML file and display the line in FreeCAD?
Thanks! /AK
Thanks! /AK
Re: Help with XML file for curved line import
Without the file we won't know.
-
- Posts: 5
- Joined: Fri Mar 31, 2023 7:05 am
Re: Help with XML file for curved line import
OK, thanks!
I have attached the XML files.
The XML files work fine with Tekla Structures.
Is there a specific way the XML needs to be formated?
/AK
I have attached the XML files.
The XML files work fine with Tekla Structures.
Is there a specific way the XML needs to be formated?
/AK
- Attachments
-
- RoadOverHighwayAlignmentsForBridgeCreator.xml
- (12.96 KiB) Downloaded 16 times
-
- HighwayAlignmentsForBridgeCreator.xml
- (92.07 KiB) Downloaded 11 times
Re: Help with XML file for curved line import
The file format isn't something FreeCAD could load out of the box but it can be implemented as an add-on. Most of the XML elements are self-explanatory but not everything. Do you know if there are official specs available for this data format?
-
- Posts: 5
- Joined: Fri Mar 31, 2023 7:05 am
Re: Help with XML file for curved line import
OK, then how do I implement it as an add-on? How do FreeCAD read a XML? I dont know about official specs, the lines descibes roads for bridge engineering purposes.
Edit: How should the XML look like in order for FreeCAD to load and display the lines?
/AK
Edit: How should the XML look like in order for FreeCAD to load and display the lines?
/AK
Re: Help with XML file for curved line import
Do you know any Python? What is needed is for someone (possibly you!) to write a Python tool that reads in that XML data, figures out what it means, and creates the appropriate shapes in FreeCAD. If you have the official specification for that file format it will probably be considerably easier (but still not totally trivial).
Re: Help with XML file for curved line import
obviously this is a different format, and one will need to either have full spec of said format or reverse engineer it.
but if you know a bit of python,
this Macro_3DXML_import can be used as starting point to decipher, parse and create fc geometry for any xml format
but if you know a bit of python,
this Macro_3DXML_import can be used as starting point to decipher, parse and create fc geometry for any xml format
-
- Posts: 5
- Joined: Fri Mar 31, 2023 7:05 am
Re: Help with XML file for curved line import
Sorry for some missinformation. I now learned that the attached XML files are LandXML version 1.2, see http://www.landxml.org/Spec.aspx. Does this help to sole my problem?
/AK
/AK
Re: Help with XML file for curved line import
Well, sort of! As I said before:
You might investigate whether someone has written a converter for LandXML into a format FreeCAD already supports, though a look through the standard makes me think that's pretty unlikely. Otherwise, there's http://www.carlsonsw.com/support/softwa ... &ss_email=
Re: Help with XML file for curved line import
When searching for "Landxml" in the forum you will find that some people has already worked on it. It's best to ping them directly and ask about the current status: search.php?keywords=landxml&style=3
It's mainly HakanSeven12 and Joel_graff
See also: https://github.com/joelgraff/freecad.trails
It's mainly HakanSeven12 and Joel_graff
See also: https://github.com/joelgraff/freecad.trails