Sat, 01/21/2023 - 16:15
I want to write/read a BSPline to/from file.
Writing to IGES is quite trivial:
Handle(Geom_BSplineCurve) m_hBSpline; IGESControl_Writer IgesWriter; IgesWriter.AddGeom(m_hBSpline); IgesWriter.Write("somefile.igs");
And this write the spline as entity 126 to the IGES file
If I look at IGESCAFControl_Reader for reading the spline, typically a TopoDS_Shape is returned, so in the case of a spline you would get a wire.
But I would like to get the original spline back: poles, breaks,....
I did find some traces back
IGESConvGeom::SplineCurveFromIGES can be used to convert IGESData_IGESEntity to Geom_BSplineCurve, so that is getting close to what I want.
How can I get all the IGESData_IGESEntity out of my iges file?
IGESControl_Reader::IGESModel returns only 1 Entity.
Sat, 01/21/2023 - 18:36
Did a bit of further research and came up with this