@@ -1890,7 +1890,55 @@ namespace webifc::geometry
18901890
18911891 break ;
18921892 }
1893- case schema::IFCBSPLINECURVE:
1893+ case schema::IFCGRADIENTCURVE:
1894+ {
1895+ _loader.MoveToArgumentOffset (expressID, 0 );
1896+ auto tokens = _loader.GetSetArgument ();
1897+ auto u = _loader.GetStringArgument ();
1898+ auto masterCurveID = _loader.GetRefArgument ();
1899+ curve = GetCurve (masterCurveID, 3 , false );
1900+
1901+ std::vector<IfcCurve> curveList;
1902+ for (auto token : tokens)
1903+ {
1904+ auto curveID = _loader.GetRefArgument (token);
1905+ IfcCurve gradientCurve = GetCurve (curveID, 3 , false );
1906+ curveList.push_back (gradientCurve);
1907+ }
1908+ // #ifdef DEBUG_DUMP_SVG
1909+ // webifc::io::DumpGradientCurve(curveList, curve,"V_gradient.obj", "H_gradient.obj");
1910+ // #endif
1911+ break ;
1912+ }
1913+ case schema::IFCCURVESEGMENT:
1914+ {
1915+ _loader.MoveToArgumentOffset (expressID, 0 );
1916+ auto type = _loader.GetStringArgument ();
1917+ _loader.MoveToArgumentOffset (expressID, 1 );
1918+ auto placementID = _loader.GetRefArgument ();
1919+ _loader.MoveToArgumentOffset (expressID, 2 );
1920+ double SegmentStart = ReadLenghtMeasure ();
1921+ _loader.MoveToArgumentOffset (expressID, 4 );
1922+ double SegmentEnd = ReadLenghtMeasure ();
1923+ _loader.MoveToArgumentOffset (expressID, 6 );
1924+ auto curveID = _loader.GetRefArgument ();
1925+
1926+ IfcTrimmingArguments trim = IfcTrimmingArguments ();
1927+ trim.start .param = SegmentStart;
1928+ trim.end .param = SegmentEnd;
1929+ trim.start .hasParam = true ;
1930+ trim.end .hasParam = true ;
1931+ ComputeCurve (curveID, curve, 3 , false , -1 , -1 , trim);
1932+
1933+ glm::dmat3 placement = GetAxis2Placement2D (placementID);
1934+
1935+ for (size_t j = 0 ; j < curve.points .size (); j++)
1936+ {
1937+ curve.points [j] = placement * glm::dvec3 (curve.points [j].x , curve.points [j].y , curve.points [j].z );
1938+ }
1939+ break ;
1940+ }
1941+ case schema::IFCBSPLINECURVE:
18941942 {
18951943 bool condition = sameSense == 0 ;
18961944 if (edge)
0 commit comments