It has the parameters, as in variables that make up the shapes, a step file just has the shapes.adrianinsaval wrote: ↑Sat Aug 07, 2021 6:10 am is it really parametric? I thought it was more like an stp file, not a mesh but not parametric either
Parametric file format
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Veteran
- Posts: 2764
- Joined: Mon Feb 27, 2012 5:31 pm
Re: Parametric file format
Re: Parametric file format
There are 2 things here:xryl669 wrote: ↑Sat Aug 07, 2021 7:16 am When I was writing parametric CAD, I was more thinking about the way Solidwork and FreeCAD interprets parametric, not the way Rhino does, that is sketch with constraints based on some dynamic value, then applying functions on it (like pad /pocket / revolve / loft etc) and then getting solid that can be combined (boolean) to make a part.
- The history of the creation, which is parametric as in "you can change the length of a pad", and corresponds more-or-less to the model tree. This is stored (for FreeCAD) in a XML file
- The resulting geometry, which is not parametric, as in "this is the result of the creation", and is similar to STEP. This is stored (for FreeCAD) as BRP files
Re: Parametric file format
If you start from an STL you will have to guess how the "triangular mesh" that is in the file was created.
STL is a mesh format that is holding only vertexes of the tringles, so if the circle is translates in an hexagon or the hexagon is the original shape in STL you have no clue about it.
This is the main problem when dealing with meshes.
FreeCAD use a different paradigm and not all the brp files in the "FCStd" container could be rebuild from scratch, as some are generated to stay here and no "primitives" are stored in the Document.XML file in the FCstd file.
It would be possible to do some parsing of the Document.XML file and see if the brp file, but has a proper FCStd file format explanation are not around (from my knowledge) it is not trivial to do so, maybe asking for some infomration to some people, that know the format better would be an idea.
Asking for a FCStd format documentation would be a more "On topic" title and maybe will lead to some interaction from the "few" people that know better this matter.
Regards
Carlo D.
STL is a mesh format that is holding only vertexes of the tringles, so if the circle is translates in an hexagon or the hexagon is the original shape in STL you have no clue about it.
This is the main problem when dealing with meshes.
FreeCAD use a different paradigm and not all the brp files in the "FCStd" container could be rebuild from scratch, as some are generated to stay here and no "primitives" are stored in the Document.XML file in the FCstd file.
It would be possible to do some parsing of the Document.XML file and see if the brp file, but has a proper FCStd file format explanation are not around (from my knowledge) it is not trivial to do so, maybe asking for some infomration to some people, that know the format better would be an idea.
Asking for a FCStd format documentation would be a more "On topic" title and maybe will lead to some interaction from the "few" people that know better this matter.
Regards
Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
Re: Parametric file format
I've started to document the file format here since I wasn't able to find any documentation anywhere. Feel free to correct any issue I've missed in my preliminary documentation.
In my Parametizer tool I'm parsing a STL model and try to rebuild an actual parametric geometry out of it. Right now, it's only exporting sketches built from model's sides (with some heuristics to find out the arcs and circles from a polygon) with the constrains it's deducing along the way.
I intend to export to a FreeCAD's FCStd format too so it'll help rebuild the model in a parametric way.
The FCStd file format is not the panacea since it's very specific to the inner working of FreeCAD (like the type attributes of the object are actual C++ types) but at least it's open if not standard.
In my Parametizer tool I'm parsing a STL model and try to rebuild an actual parametric geometry out of it. Right now, it's only exporting sketches built from model's sides (with some heuristics to find out the arcs and circles from a polygon) with the constrains it's deducing along the way.
I intend to export to a FreeCAD's FCStd format too so it'll help rebuild the model in a parametric way.
The FCStd file format is not the panacea since it's very specific to the inner working of FreeCAD (like the type attributes of the object are actual C++ types) but at least it's open if not standard.