Compare b0ca5e6 ... +3 ... a478a82

Coverage Reach
wing/CCPACSWingComponentSegment.cpp wing/CCPACSWingSegment.cpp wing/CCPACSWing.cpp wing/CCPACSWingRibsDefinition.cpp wing/CCPACSWingCell.cpp wing/CCPACSWingSparSegment.cpp wing/CTiglWingProfilePointList.cpp wing/tiglwingribhelperfunctions.cpp wing/CCPACSWingProfile.cpp wing/CCPACSWingProfileCST.cpp wing/CTiglWingStructureReference.cpp wing/CCPACSWingSparPosition.cpp wing/CCPACSWingRibsPositioning.cpp wing/CCPACSWingCellPositionSpanwise.cpp wing/tigletaxsifunctions.cpp wing/CTiglWingChordface.cpp wing/CCPACSWingRibExplicitPositioning.cpp wing/CTiglWingBuilder.cpp wing/CCPACSWingCSStructure.cpp wing/CTiglWingSegmentGuidecurveBuilder.cpp wing/CCPACSWingCellPositionChordwise.cpp wing/CTiglWingConnection.cpp wing/CCPACSWingSegments.cpp wing/CCPACSWings.cpp wing/CCPACSWingProfileGetPointAlgo.cpp wing/CCPACSWingShell.cpp wing/CCPACSWingProfiles.cpp wing/CCPACSWingComponentSegments.cpp wing/CCPACSWingRibsDefinitions.cpp wing/CCPACSWingSection.cpp wing/CCPACSWingSparSegments.cpp wing/CCPACSWingSectionElement.cpp wing/CCPACSWingCells.cpp wing/CCPACSWingSections.cpp wing/CCPACSWingRibRotation.cpp wing/CCPACSWingSectionElements.cpp wing/CTiglWingSegmentList.h wing/CCPACSWingRibCrossSection.cpp wing/CCPACSWingSparPositions.cpp wing/CCPACSWingSparPositionUIDs.cpp wing/CCPACSWingRibsDefinition.h wing/EtaXsi.h wing/CCPACSWingComponentSegment.h wing/CCPACSWingSegment.h wing/CCPACSWingSparSegment.h wing/CCPACSWing.h wing/CTiglWingChordface.h wing/CCPACSWingSpars.cpp wing/CCPACSWingSegments.h wing/CCPACSWingProfileCST.h wing/ITiglWingProfileAlgo.h wing/CTiglWingProfilePointList.h wing/CCPACSWingCell.h wing/CCPACSWingSparPositions.h wing/CCPACSWingRibsDefinitions.h wing/CCPACSWingComponentSegments.h wing/CCPACSWingCSStructure.h wing/CCPACSWingSparPosition.h wing/CCPACSWings.h wing/CCPACSWingSectionElement.h wing/CCPACSWingProfiles.h wing/CCPACSWingRibCrossSection.h wing/CCPACSWingCells.h wing/CTiglWingConnection.h wing/CCPACSWingSparSegments.h wing/CCPACSWingCellPositionSpanwise.h wing/CCPACSWingSpars.h wing/CCPACSWingSectionElements.h wing/CCPACSWingSection.h wing/CCPACSWingSparPositionUIDs.h wing/CCPACSWingProfileGetPointAlgo.h wing/CCPACSWingCellPositionChordwise.h wing/CCPACSWingRibRotation.h wing/CCPACSWingSections.h wing/CCPACSWingShell.h api/tigl.cpp geometry/CTiglBSplineAlgorithms.cpp geometry/CTiglTransformation.cpp geometry/CTiglBSplineApproxInterp.cpp geometry/CTiglPolyData.cpp geometry/CTiglIntersectionCalculation.cpp geometry/CTiglBSplineFit.cpp geometry/CTiglInterpolateCurveNetwork.cpp geometry/CTiglTriangularizer.cpp geometry/CFunctionToBspline.cpp geometry/CTiglMakeLoft.cpp geometry/CTiglPointsToBSplineInterpolation.cpp geometry/CCPACSTransformation.cpp geometry/CTiglInterpolatePointsWithKinks.cpp geometry/CTiglGordonSurfaceBuilder.cpp geometry/CTiglRelativelyPositionedComponent.cpp geometry/CTiglTopoAlgorithms.cpp geometry/CNamedShape.cpp geometry/CTiglPoint.cpp geometry/CTiglCurvesToSurface.cpp geometry/CTiglInterpolateBsplineWire.cpp geometry/CTiglPatchShell.cpp geometry/CTiglInterpolateLinearWire.cpp geometry/CTiglAbstractGeometricComponent.cpp geometry/CCPACSRotationCurve.cpp geometry/CCPACSGenericSystem.cpp geometry/CCPACSFarField.cpp geometry/CTiglProjectOnLinearSpline.cpp geometry/CTiglLineSegment.cpp geometry/CTiglArcLengthReparameterization.cpp geometry/CCSTCurveBuilder.cpp geometry/CPointsToLinearBSpline.cpp geometry/CTiglConcatSurfaces.cpp geometry/CTiglShapeCache.cpp geometry/CWireToCurve.cpp geometry/CCPACSGenericSystems.cpp geometry/CTiglCompoundSurface.cpp geometry/CTiglAbstractSegment.h geometry/CCPACSACSystems.cpp geometry/ECPACSTranslationType.h geometry/CTiglCurvesToSurface.h geometry/CCPACSRotationCurve.h geometry/CTiglBSplineApproxInterp.h geometry/CTiglTriangularizer.h geometry/ITiglGeometricComponent.h geometry/ITiglWireAlgorithm.h geometry/CTiglCompoundSurface.h geometry/CCPACSGenericSystem.h geometry/CTiglInterpolatePointsWithKinks.h geometry/CTiglPatchShell.h geometry/CTiglConcatSurfaces.h geometry/CTiglLineSegment.h geometry/CNamedShape.h geometry/CTiglPointsToBSplineInterpolation.h geometry/CTiglBSplineAlgorithms.h geometry/CTiglAbstractGeometricComponent.h geometry/CTiglPolyData.h geometry/CTiglArcLengthReparameterization.h geometry/CTiglBSplineFit.h geometry/CCPACSFarField.h geometry/CCSTCurveBuilder.h geometry/CTiglApproxResult.h geometry/CTiglIntersectionPoint.h geometry/CTiglRelativelyPositionedComponent.h geometry/CTiglInterpolateCurveNetwork.h geometry/CTiglMakeLoft.h geometry/CTiglInterpolateBsplineWire.h geometry/CWireToCurve.h geometry/CCPACSTransformation.h geometry/CTiglGordonSurfaceBuilder.h geometry/CTiglShapeCache.h fuselage/CCPACSFuselageSegment.cpp fuselage/CCPACSFuselage.cpp fuselage/CCPACSFrame.cpp fuselage/CCPACSFuselageProfile.cpp fuselage/CCPACSFuselageStringerFramePosition.cpp fuselage/CCPACSFuselageStringer.cpp fuselage/CTiglStringerFrameBorderedObject.cpp fuselage/CCPACSCrossBeamAssemblyPosition.cpp fuselage/CCPACSCrossBeamStrutAssemblyPosition.cpp fuselage/CCPACSPressureBulkheadAssemblyPosition.cpp fuselage/CTiglFuselageConnection.cpp fuselage/CCPACSLongFloorBeam.cpp fuselage/CCPACSFuselageSegments.cpp fuselage/CCPACSFuselageProfiles.cpp fuselage/CTiglFuselageSegmentGuidecurveBuilder.cpp fuselage/CCPACSLongFloorBeamPosition.cpp fuselage/CCPACSFuselageProfileGetPointAlgo.cpp fuselage/CCPACSDoorAssemblyPosition.cpp fuselage/CCPACSFuselages.cpp fuselage/CCPACSFuselageSectionElement.cpp fuselage/CCPACSFuselageSection.cpp fuselage/CCPACSSkinSegment.cpp fuselage/CCPACSFuselageStructure.cpp fuselage/CCPACSFuselageSections.cpp fuselage/CCPACSFuselageSectionElements.cpp fuselage/CCPACSCargoCrossBeamStrutsAssembly.cpp fuselage/CCPACSFramesAssembly.cpp fuselage/CCPACSLongFloorBeamsAssembly.cpp fuselage/CCPACSCargoCrossBeamsAssembly.cpp fuselage/CCPACSPressureBulkheadAssembly.cpp fuselage/CCPACSStringersAssembly.cpp fuselage/CCPACSFuselageSegment.h fuselage/CTiglStringerFrameBorderedObject.h fuselage/CCPACSFuselage.h fuselage/CCPACSFuselageProfile.h fuselage/CCPACSFuselageSections.h fuselage/CCPACSFuselages.h fuselage/CCPACSCrossBeamAssemblyPosition.h fuselage/CCPACSFuselageStructure.h fuselage/CCPACSFuselageProfiles.h fuselage/CTiglFuselageConnection.h fuselage/CCPACSStringersAssembly.h fuselage/CCPACSPressureBulkheadAssemblyPosition.h fuselage/CCPACSDoorAssemblyPosition.h fuselage/CCPACSFuselageSectionElements.h fuselage/CCPACSLongFloorBeam.h fuselage/CCPACSFuselageSectionElement.h fuselage/CCPACSFuselageSection.h fuselage/CCPACSCargoCrossBeamsAssembly.h fuselage/CCPACSCargoCrossBeamStrutsAssembly.h fuselage/CCPACSFramesAssembly.h fuselage/CCPACSPressureBulkheadAssembly.h fuselage/CCPACSFrame.h fuselage/CCPACSCrossBeamStrutAssemblyPosition.h fuselage/CCPACSFuselageStringerFramePosition.h fuselage/CCPACSFuselageSegments.h fuselage/CCPACSLongFloorBeamPosition.h fuselage/CCPACSFuselageProfileGetPointAlgo.h fuselage/CCPACSSkinSegment.h fuselage/CCPACSLongFloorBeamsAssembly.h fuselage/CCPACSFuselageStringer.h common/tiglcommonfunctions.cpp common/COptionList.h common/any.h common/Debugging.cpp common/tiglcommonfunctions.h common/stringtools.h common/sorting.h common/ReentryGuard.h common/to_string.h common/typename.cpp common/Debugging.h common/typename.h exports/CTiglExportVtk.cpp exports/CTiglExportIges.cpp exports/CTiglExportCollada.cpp exports/CTiglExportStep.cpp exports/CTiglCADExporter.cpp exports/CTiglExportStl.cpp exports/CTiglCADExporter.h exports/CTiglExporterFactory.cpp exports/CTiglExportBrep.cpp exports/CTiglExportIges.h exports/CGlobalExporterConfigs.cpp exports/CTiglExportStep.h exports/CTiglExportBrep.h exports/CCPACSImportExport.h exports/CTiglExportVtk.h exports/CTiglExportCollada.h exports/CTiglExportStl.h exports/CTiglExporterFactory.h exports/CGlobalExporterConfigs.h contrib/SurfTools.cxx contrib/MakePatches.cxx contrib/MakeLoops.cxx contrib/MakeLoops.hxx contrib/MakePatches.hxx math/tiglmathfunctions.cpp math/CTiglIntersectBSplines.cpp math/CTiglPointTranslator.cpp math/CTiglProjectPointOnCurveAtAngle.cpp math/CTiglOptimizer.cpp math/ITiglObjectiveFunction.cpp math/CTiglProjectPointOnCurveAtAngle.h math/CTiglPointTranslator.h math/tiglmathfunctions.h math/CTiglIntersectBSplines.h boolean_operations/GEOMAlgo_Splitter.cxx boolean_operations/CTrimShape.cpp boolean_operations/CFuseShapes.cpp boolean_operations/CMergeShapes.cpp boolean_operations/CBopCommon.cpp boolean_operations/CCutShape.cpp boolean_operations/CBooleanOperTools.cpp boolean_operations/CGroupShapes.cpp boolean_operations/BRepSewingToBRepBuilderShapeAdapter.cpp boolean_operations/BOPBuilderShapeToBRepBuilderShapeAdapter.cpp boolean_operations/BOPBuilderShapeToBRepBuilderShapeAdapter.h boolean_operations/BRepSewingToBRepBuilderShapeAdapter.h engine_nacelle/CCPACSNacelleCowl.cpp engine_nacelle/CTiglNacelleGuideCurveBuilder.cpp engine_nacelle/CCPACSNacelleProfile.cpp engine_nacelle/CCPACSNacelleSection.cpp engine_nacelle/CCPACSNacelleCenterCowl.cpp engine_nacelle/CCPACSEnginePosition.cpp engine_nacelle/CTiglEngineNacelleBuilder.cpp engine_nacelle/CCPACSNacelleSections.cpp engine_nacelle/CCPACSEnginePositions.cpp engine_nacelle/CCPACSEngines.cpp engine_nacelle/CCPACSNacelleGuideCurves.cpp engine_nacelle/CCPACSEnginePosition.h engine_nacelle/CCPACSNacelleCowl.h engine_nacelle/CTiglNacelleGuideCurveBuilder.h engine_nacelle/CCPACSNacelleProfile.h engine_nacelle/CCPACSEnginePositions.h engine_nacelle/CCPACSNacelleSection.h engine_nacelle/CCPACSEngines.h engine_nacelle/CCPACSNacelleSections.h engine_nacelle/CCPACSNacelleCenterCowl.h engine_nacelle/CCPACSNacelleGuideCurves.h control_devices/CCPACSTrailingEdgeDevice.cpp control_devices/CControlSurfaceBorderBuilder.cpp control_devices/CCPACSControlSurfaceBorderTrailingEdge.cpp control_devices/CTiglControlSurfaceTransformation.cpp control_devices/CCPACSControlSurfaceWingCutOut.cpp control_devices/CCPACSControlSurfaceOuterShapeTrailingEdge.cpp control_devices/CTiglControlSurfaceBorderCoordinateSystem.cpp control_devices/CCPACSControlSurfaces.cpp control_devices/CCPACSTrailingEdgeDevice.h control_devices/CCPACSControlSurfaceOuterShapeTrailingEdge.h control_devices/CCPACSControlSurfaceWingCutOut.h control_devices/CCPACSControlSurfaces.h control_devices/CCPACSControlSurfaceBorderTrailingEdge.h configuration/CCPACSConfiguration.cpp configuration/CTiglFusePlane.cpp configuration/CCPACSConfigurationManager.cpp configuration/CTiglShapeGeomComponentAdaptor.h configuration/CTiglFusePlane.h rotor/CTiglAttachedRotorBlade.cpp rotor/CCPACSRotor.cpp rotor/CCPACSRotorBladeAttachment.cpp rotor/CCPACSRotorProfiles.cpp rotor/CCPACSRotorHub.cpp rotor/CCPACSRotorBlades.cpp rotor/CCPACSRotorHinge.cpp rotor/CCPACSRotors.cpp rotor/CCPACSRotorBladeAttachments.cpp rotor/CCPACSRotorHinges.cpp rotor/CCPACSRotor.h rotor/CTiglAttachedRotorBlade.h rotor/CCPACSRotorProfiles.h rotor/CCPACSRotorHinge.h rotor/CCPACSRotorBladeAttachments.h rotor/CCPACSRotors.h rotor/CCPACSRotorBlades.h rotor/CCPACSRotorBladeAttachment.h rotor/CCPACSRotorHinges.h rotor/CCPACSRotorHub.h guide_curves/CTiglCurveConnector.cpp guide_curves/CTiglCurveNetworkSorter.cpp guide_curves/CCPACSGuideCurves.cpp guide_curves/CCPACSGuideCurve.cpp guide_curves/CCPACSGuideCurveAlgo.h guide_curves/CCPACSGuideCurveProfiles.cpp guide_curves/CTiglCurveNetworkSorter.h guide_curves/CTiglCurveConnector.h guide_curves/CCPACSGuideCurveProfile.cpp guide_curves/CCPACSGuideCurveProfile.h guide_curves/CCPACSGuideCurveProfiles.h guide_curves/CCPACSGuideCurves.h guide_curves/CCPACSGuideCurve.h cpacs_other/CTiglUIDManager.cpp cpacs_other/CCPACSExternalObject.cpp cpacs_other/CCPACSMaterialDefinition.cpp cpacs_other/CTiglUIDManager.h cpacs_other/CCPACSAircraftModel.cpp cpacs_other/CCPACSRotorcraftModel.cpp cpacs_other/CTiglUIDObject.cpp cpacs_other/CCPACSExternalObjects.cpp cpacs_other/CTiglUIDObject.h cpacs_other/CCPACSProfiles.cpp cpacs_other/CCPACSStructuralProfiles.cpp cpacs_other/CCPACSStructuralProfiles.h cpacs_other/CCPACSExternalObject.h cpacs_other/CCPACSMaterialDefinition.h cpacs_other/CCPACSRotorcraftModel.h cpacs_other/CCPACSProfiles.h cpacs_other/CCPACSAircraftModel.h cpacs_other/CCPACSExternalObjects.h cpacs_other/ITiglUIDRefObject.h structural_elements/CCPACSFuselageWallSegment.cpp structural_elements/CCPACSWallPosition.cpp structural_elements/CCPACSWalls.cpp structural_elements/CCPACSProfileBasedStructuralElement.cpp structural_elements/CCPACSSheetList.cpp structural_elements/CCPACSFuselageWallSegment.h structural_elements/CCPACSPressureBulkhead.cpp structural_elements/CCPACSDoors.cpp structural_elements/CCPACSPressureBulkheads.cpp structural_elements/CCPACSSheetList.h structural_elements/CCPACSProfileBasedStructuralElement.h structural_elements/CCPACSDoors.h structural_elements/CCPACSPressureBulkheads.h structural_elements/CCPACSWalls.h structural_elements/CCPACSPressureBulkhead.h structural_elements/CCPACSWallPosition.h logging/CTiglLogging.cpp logging/CTiglFileLogger.cpp logging/CTiglLogSplitter.cpp logging/CTiglConsoleLogger.cpp logging/ITiglLogger.h logging/CTiglConsoleLogger.h imports/CTiglStepReader.cpp imports/CTiglImporterFactory.cpp imports/ICADImporterCreator.h imports/ITiglCADImporter.h imports/CTiglImporterFactory.h CCPACSPositioning.cpp engine_pylon/CCPACSEnginePylons.cpp engine_pylon/CCPACSEnginePylon.cpp engine_pylon/CTiglEnginePylonBuilder.cpp engine_pylon/CTiglEnginePylonBuilder.h engine_pylon/CCPACSEnginePylon.h engine_pylon/CCPACSEnginePylons.h CCPACSCurvePointListXYZ.cpp CCPACSPositionings.cpp CCPACSPointAbsRel.cpp CCPACSPoint.cpp CCPACSStringVector.cpp TiglRotorHubType.h TiglFarFieldType.h CCPACSCurveParamPointMap.cpp TiglSymmetryAxis.h system/CTiglMemoryPool.cpp system/CTiglTypeRegistry.cpp system/CTiglError.cpp CCPACSPointListRelXYZVector.cpp CCPACSEtaIsoLine.cpp CCPACSPointXY.cpp CCPACSPointListXYVector.cpp CCPACSEtaXsiPoint.cpp CCPACSPointListXY.cpp Cache.h CCPACSCurvePoint.cpp CCPACSXsiIsoLine.cpp CCPACSCurvePointListXYZ.h CCPACSEtaXsiPoint.h CCPACSCurvePoint.h CCPACSPointXY.h CCPACSPoint.h CCPACSPointListRelXYZVector.h CCPACSPositioning.h CCPACSStringVector.h CCPACSEtaIsoLine.h CCPACSPointListXY.h CCPACSXsiIsoLine.h CCPACSPointAbsRel.h CCPACSPointListXYVector.h CCPACSCurveParamPointMap.h

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.


@@ -31,6 +31,7 @@
Loading
31 31
#include "contrib/MakePatches.hxx"
32 32
#include "geometry/CTiglTopoAlgorithms.h"
33 33
#include "geometry/CTiglBSplineAlgorithms.h"
34 +
#include "system/CTiglError.h"
34 35
35 36
36 37
#include <TopoDS.hxx>
@@ -240,6 +241,15 @@
Loading
240 241
241 242
void CTiglMakeLoft::makeLoftWithoutGuides()
242 243
{
244 +
    // check number of edges are all same
245 +
    std::vector<unsigned int> edgeCountPerProfile;
246 +
    for (const auto& profile : profiles) {
247 +
        edgeCountPerProfile.push_back(GetNumberOfEdges(profile));
248 +
    }
249 +
    if (!AllSame(edgeCountPerProfile.begin(), edgeCountPerProfile.end())) {
250 +
        throw tigl::CTiglError("Number of edges not equal in CTiglMakeLoft");
251 +
    }
252 +
243 253
    TopoDS_Shell faces;
244 254
    BRep_Builder builder;
245 255
    builder.MakeShell(faces);

@@ -449,6 +449,19 @@
Loading
449 449
    return theScale;
450 450
}
451 451
452 +
double CTiglBSplineAlgorithms::scale(const TColgp_Array1OfPnt& points)
453 +
{
454 +
    double theScale = 0.;
455 +
456 +
    for (int i = points.Lower(); i <= points.Upper(); ++i) {
457 +
        for (int j = i + 1; j < points.Upper(); ++j) {
458 +
            double dist = points.Value(i).Distance(points.Value(j));
459 +
            theScale = std::max(theScale, dist);
460 +
        }
461 +
    }
462 +
    return theScale;
463 +
}
464 +
452 465
std::vector<double> CTiglBSplineAlgorithms::computeParamsBSplineCurve(const Handle(TColgp_HArray1OfPnt)& points, const double alpha)
453 466
{
454 467
    return computeParamsBSplineCurve(points, 0., 1., alpha);

@@ -190,6 +190,19 @@
Loading
190 190
191 191
    // Build the B-Spline
192 192
    auto occPoints = OccArray(points);
193 +
194 +
    // we always want to include the endpoint, if it's the same as the startpoint
195 +
    // we use the middle to enforce closing of the spline
196 +
    gp_Pnt pStart =  points.front().Get_gp_Pnt();
197 +
    gp_Pnt pEnd   =  points.back().Get_gp_Pnt();
198 +
199 +
    // this check allows some tolerance, based on the absolute size of the profile
200 +
    if (pStart.Distance(pEnd) < 0.005*CTiglBSplineAlgorithms::scale(occPoints->Array1())) {
201 +
        gp_Pnt pMiddle = 0.5 * (pStart.XYZ() + pEnd.XYZ());
202 +
        occPoints->SetValue(occPoints->Lower(), pMiddle);
203 +
        occPoints->SetValue(occPoints->Upper(), pMiddle);
204 +
    }
205 +
193 206
    CTiglInterpolatePointsWithKinks interp(occPoints, kinks, params, 0.5, 3);
194 207
    auto spline = interp.Curve();
195 208

@@ -362,6 +362,15 @@
Loading
362 362
    return idx < array.size();
363 363
}
364 364
365 +
/**
366 +
 * Returns true, if all elements are the same
367 +
 */
368 +
template <typename ForwardIter>
369 +
bool AllSame(ForwardIter begin, ForwardIter end)
370 +
{
371 +
    return std::adjacent_find( begin, end, std::not_equal_to<typename std::iterator_traits<ForwardIter>::value_type>() ) == end;
372 +
}
373 +
365 374
template <class ArrayType, typename BinaryPredicate, typename BinaryMerge>
366 375
void ReplaceAdjacentWithMerged(ArrayType& list, BinaryPredicate is_adjacent, BinaryMerge merged)
367 376
{

@@ -242,6 +242,9 @@
Loading
242 242
    /// Returns the scale of the point matrix
243 243
    TIGL_EXPORT static double scale(const TColgp_Array2OfPnt& points);
244 244
245 +
    /// Returns the scale of the point list by searching for the largest distance between two points
246 +
    TIGL_EXPORT static double scale(const TColgp_Array1OfPnt& points);
247 +
245 248
    /**
246 249
     * Returns positions, where the curve has kinks (C1 Discontinuities)
247 250
     */

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
src 0.02% 69.44%
Project Totals (425 files) 69.44%
Loading