mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-27 18:57:17 +00:00
Use value serialization in sphere example
Update the stale pointer-form example and pass the IFC file required by the current serialization API. Generated with the assistance of an AI coding tool.
This commit is contained in:
@@ -134,10 +134,10 @@ int main() {
|
|||||||
// Note that IFC lacks elementary surfaces that STEP does have, such as spherical_surface.
|
// Note that IFC lacks elementary surfaces that STEP does have, such as spherical_surface.
|
||||||
// BRepBuilderAPI_NurbsConvert can be used to serialize such surfaces as nurbs surfaces.
|
// BRepBuilderAPI_NurbsConvert can be used to serialize such surfaces as nurbs surfaces.
|
||||||
TopoDS_Shape sphere = BRepPrimAPI_MakeSphere(gp_Pnt(), 1000.).Shape();
|
TopoDS_Shape sphere = BRepPrimAPI_MakeSphere(gp_Pnt(), 1000.).Shape();
|
||||||
IfcSchema::IfcProductDefinitionShape* sphere_representation = ifcopenshell::geom::serialise(sphere, true);
|
auto sphere_representation = ifcopenshell::geom::serialise(file, sphere, true);
|
||||||
if (S(IfcSchema::Identifier) == "IFC4") {
|
if (S(IfcSchema::Identifier) == "IFC4") {
|
||||||
sphere = BRepBuilderAPI_NurbsConvert(sphere, true).Shape();
|
sphere = BRepBuilderAPI_NurbsConvert(sphere, true).Shape();
|
||||||
sphere_representation = ifcopenshell::geom::serialise(sphere, true);
|
sphere_representation = ifcopenshell::geom::serialise(file, sphere, true);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user