private CompactionProfileResult <CompactionSummaryVolumesProfileCell> ProcessSummaryVolumesWithRaptor(CompactionProfileProductionDataRequest request) { var alignmentDescriptor = RaptorConverters.DesignDescriptor(request.AlignmentDesign); var liftBuildSettings = RaptorConverters.ConvertLift(request.LiftBuildSettings, TFilterLayerMethod.flmNone); var baseFilter = RaptorConverters.ConvertFilter(request.BaseFilter, request.ProjectId, raptorClient); var topFilter = RaptorConverters.ConvertFilter(request.TopFilter, request.ProjectId, raptorClient); var volumeDesignDescriptor = RaptorConverters.DesignDescriptor(request.VolumeDesignDescriptor); ProfilesHelper.ConvertProfileEndPositions(request.GridPoints, request.WGS84Points, out var startPt, out var endPt, out var positionsAreGrid); if (request.VolumeCalcType.HasValue && request.VolumeCalcType.Value != VolumeCalcType.None) { var volCalcType = (TComputeICVolumesType)request.VolumeCalcType.Value; if (volCalcType == TComputeICVolumesType.ic_cvtBetween2Filters && !request.ExplicitFilters) { RaptorConverters.AdjustFilterToFilter(ref baseFilter, topFilter); } MemoryStream memoryStream; if (request.IsAlignmentDesign) { var args = ASNode.RequestSummaryVolumesAlignmentProfile.RPC.__Global .Construct_RequestSummaryVolumesAlignmentProfile_Args (request.ProjectId ?? VelociraptorConstants.NO_PROJECT_ID, ProfilesHelper.PROFILE_TYPE_NOT_REQUIRED, volCalcType, request.StartStation ?? ValidationConstants3D.MIN_STATION, request.EndStation ?? ValidationConstants3D.MIN_STATION, alignmentDescriptor, baseFilter, topFilter, liftBuildSettings, volumeDesignDescriptor); memoryStream = raptorClient.GetSummaryVolumesAlignmentProfile(args); } else { var args = ASNode.RequestSummaryVolumesProfile.RPC.__Global.Construct_RequestSummaryVolumesProfile_Args( request.ProjectId ?? VelociraptorConstants.NO_PROJECT_ID, ProfilesHelper.PROFILE_TYPE_HEIGHT, volCalcType, startPt, endPt, positionsAreGrid, baseFilter, topFilter, liftBuildSettings, volumeDesignDescriptor); memoryStream = raptorClient.GetSummaryVolumesProfile(args); } return(memoryStream != null?ConvertSummaryVolumesProfileResult(memoryStream, request.VolumeCalcType.Value) : null); } return(null); }