public static void doFastenerDetection(string[] args) { state = new ProgramState(); SetInputArguments(state, args); LoadState(); Solids = GetSTLs(state.inputDir); EnlargeTheSolid(); AssemblyGraph = new designGraph(); DisassemblyDirectionsWithFastener.RunGeometricReasoning(Solids); if (DetectFasteners) { DisassemblyDirectionsWithFastener.RunFastenerDetection(Solids, FastenersAreThreaded); } SerializeSolidProperties(); SaveState(); if (serverMode) { state.Save(state.inputDir + slash + "intermediate" + slash + "ProgramState.xml"); } else { state.Save(state.inputDir + slash + "bin" + slash + "intermediate" + slash + "ProgramState.xml"); } Console.WriteLine("\nDone"); }
private static void Main(string[] args) { state = new ProgramState(); SetInputArguments(state, args); LoadState(); Solids = GetSTLs(state.inputDir); EnlargeTheSolid(); AssemblyGraph = new designGraph(); DisassemblyDirectionsWithFastener.RunGeometricReasoning(Solids); if (DetectFasteners) { DisassemblyDirectionsWithFastener.RunFastenerDetection(Solids, FastenersAreThreaded); } //SolidsNoFastener = Solids; SerializeSolidProperties(); Console.WriteLine("\nPress enter once input parts table generated >>"); Console.ReadLine(); DeserializeSolidProperties(); globalDirPool = DisassemblyDirectionsWithFastener.RunGraphGeneration(AssemblyGraph, SolidsNoFastener); //the second user interaction must happen here SaveDirections(); var connectedGraph = false; while (!connectedGraph) { Console.WriteLine("\n\nPress enter once input directions generated >>"); Console.ReadLine(); LoadDirections(); connectedGraph = DisassemblyDirectionsWithFastener.GraphIsConnected(AssemblyGraph); } NonadjacentBlockingWithPartitioning.Run(AssemblyGraph, SolidsNoFastenerSimplified, globalDirPool); GraphSaving.SaveTheGraph(AssemblyGraph); Stabilityfunctions.GenerateReactionForceInfo(AssemblyGraph); var leapSearch = new LeapSearch(); var solutions = leapSearch.Run(AssemblyGraph, Solids, globalDirPool); OptimalOrientation.Run(solutions); var cand = new AssemblyCandidate() { Sequence = solutions }; cand.SaveToDisk(state.inputDir + "solution.xml"); WorkerAllocation.Run(solutions); Console.WriteLine("\n\nDone"); Console.ReadLine(); }