MCPcopy Create free account
hub / github.com/assimp/assimp / ProcessCurve

Function ProcessCurve

code/AssetLib/IFC/IFCProfile.cpp:66–90  ·  view source on GitHub ↗

------------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

64
65// ------------------------------------------------------------------------------------------------
66bool ProcessCurve(const Schema_2x3::IfcCurve& curve,
67 TempMesh& meshout,
68 ConversionData& conv) {
69 std::unique_ptr<const Curve> cv(Curve::Convert(curve,conv));
70 if (!cv) {
71 IFCImporter::LogWarn("skipping unknown IfcCurve entity, type is ", curve.GetClassName());
72 return false;
73 }
74
75 // we must have a bounded curve at this point
76 if (const BoundedCurve* bc = dynamic_cast<const BoundedCurve*>(cv.get())) {
77 try {
78 bc->SampleDiscrete(meshout);
79 }
80 catch(const CurveError& cv) {
81 IFCImporter::LogError(cv.mStr, " (error occurred while processing curve)");
82 return false;
83 }
84 meshout.mVertcnt.push_back(static_cast<unsigned int>(meshout.mVerts.size()));
85 return true;
86 }
87
88 IFCImporter::LogError("cannot use unbounded curve as profile");
89 return false;
90}
91
92// ------------------------------------------------------------------------------------------------
93void ProcessClosedProfile(const Schema_2x3::IfcArbitraryClosedProfileDef& def,

Calls 5

GetClassNameMethod · 0.80
getMethod · 0.45
SampleDiscreteMethod · 0.45
push_backMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected