private AlignmentLineworkResult ProcessWithRaptor(AlignmentLineworkRequest request) { const double ImperialFeetToMetres = 0.3048; const double USFeetToMetres = 0.304800609601; //NOTE: For alignment files only (not surfaces), there are labels generated as part of the DXF file. //They need to be in the user units. double interval; TVLPDDistanceUnits raptorUnits; switch (request.UserUnits) { case DxfUnitsType.ImperialFeet: raptorUnits = TVLPDDistanceUnits.vduImperialFeet; interval = 300 * ImperialFeetToMetres; break; case DxfUnitsType.Meters: raptorUnits = TVLPDDistanceUnits.vduMeters; interval = 100; break; case DxfUnitsType.UsSurveyFeet: default: raptorUnits = TVLPDDistanceUnits.vduUSSurveyFeet; interval = 300 * USFeetToMetres; break; } log.LogDebug($"Getting DXF design boundary from Raptor for {request.FileDescriptor.FileName} for project {request.ProjectUid}"); raptorClient.GetDesignBoundary( DesignProfiler.ComputeDesignBoundary.RPC.__Global.Construct_CalculateDesignBoundary_Args (request.ProjectId.Value, request.FileDescriptor.DesignDescriptor(configStore, log, 0, 0), DesignProfiler.ComputeDesignBoundary.RPC.TDesignBoundaryReturnType.dbrtDXF, interval, raptorUnits, 0), out var memoryStream, out var designProfilerResult); if (memoryStream == null || designProfilerResult != TDesignProfilerRequestResult.dppiOK) { log.LogWarning($"Failed to generate DXF boundary for file {request.FileDescriptor.FileName} for project {request.ProjectUid}. Raptor error {designProfilerResult}"); throw CreateServiceException <AlignmentLineworkExecutor>((int)designProfilerResult); } return(new AlignmentLineworkResult(memoryStream)); }
private Task <AlignmentLineworkResult> ProcessWithTRex(AlignmentLineworkRequest request) { throw new NotImplementedException("TRex Gateway not yet implemented for AlignmentLineworkExecutor"); }