public static void Merge(this InspectionSchema masterInspectionSchema, InspectionSchema slaveInspectionSchema) { masterInspectionSchema.CoordinateCircles.AddRange(slaveInspectionSchema.CoordinateCircles); masterInspectionSchema.CoordinateEdges.AddRange(slaveInspectionSchema.CoordinateEdges); masterInspectionSchema.EdgeSearchingDefinitions.AddRange(slaveInspectionSchema.EdgeSearchingDefinitions); masterInspectionSchema.PartSearchingDefinitions.AddRange(slaveInspectionSchema.PartSearchingDefinitions); masterInspectionSchema.CircleSearchingDefinitions.AddRange(slaveInspectionSchema.CircleSearchingDefinitions); masterInspectionSchema.DistanceBetweenLinesDefinitions.AddRange(slaveInspectionSchema.DistanceBetweenLinesDefinitions); masterInspectionSchema.DistanceBetweenIntersectionPointsDefinitions.AddRange(slaveInspectionSchema.DistanceBetweenIntersectionPointsDefinitions); masterInspectionSchema.SurfaceDefinitions.AddRange(slaveInspectionSchema.SurfaceDefinitions); masterInspectionSchema.DefectDefinitions.AddRange(slaveInspectionSchema.DefectDefinitions); masterInspectionSchema.RegionTargetDefinitions.AddRange(slaveInspectionSchema.RegionTargetDefinitions); }
public static InspectionSchema CreateDefaultSchema() { var defaultSchema = new InspectionSchema(); defaultSchema.CircleSearchingDefinitions.Add(new CircleSearchingDefinition()); defaultSchema.EdgeSearchingDefinitions.Add(new EdgeSearchingDefinition() { RelativeLine = new Line(1, 2, 3, 4) }); // defaultSchema.CropRect = new Int32Rect(11, 22, 33, 44); // defaultSchema.CircleSearchingEnable = true; // defaultSchema.EdgeSearchingEnable = true; return(defaultSchema); }
public ISetImage SetInspectionSchema(InspectionSchema inspectionSchema) { _inspectionSchema = inspectionSchema; return(this); }