------------------------------------------------------------------------------------------------
| 64 | |
| 65 | // ------------------------------------------------------------------------------------------------ |
| 66 | bool 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 | // ------------------------------------------------------------------------------------------------ |
| 93 | void ProcessClosedProfile(const Schema_2x3::IfcArbitraryClosedProfileDef& def, |
no test coverage detected