This commit is contained in:
MarkVoltov 2024-12-01 22:14:19 +03:00
parent ca0df838a2
commit deee7b4329
9 changed files with 15 additions and 9 deletions

View file

@ -37,4 +37,4 @@ def draw_graph_with_thumbnails(G, image_folder):
def main():
sequences = load_sequences('valid_sequences.json')
G = create_graph(sequences)
draw_graph_with_thumbnails(G, '/home/markvoltov/GitProjects/framework/test_models/img')
draw_graph_with_thumbnails(G, 'path_to_img')

View file

@ -35,7 +35,7 @@ def draw_graph(G):
plt.show()
def main():
sequence = load_assembly_sequence('/home/markvoltov/GitProjects/framework/test_models/adjacency_matrix.json')
sequence = load_assembly_sequence('path_to_adjacency_matrix.json')
assembly_graph = create_assembly_graph(sequence)
draw_graph(assembly_graph)

View file

@ -3,7 +3,7 @@ import FreeCADGui as Gui
import Draft
import json
sequence_file = '/home/markvoltov/GitProjects/framework/freecad_workbench/freecad/robossembler/sequences.json'
sequence_file = 'path_to_sequencesjson'
def load_assembly_sequence(filepath):
with open(filepath, 'r') as file:

View file

@ -1,5 +1,5 @@
{
"cadFilePath": "/home/markvoltov/GitProjects/framework/test_models/test_reductor.FCStd",
"outPath": "/home/markvoltov/GitProjects/framework/test_models/",
"cadFilePath": "path_to_cad_file",
"outPath": "out_path",
"objectIndentation": 0
}

View file

@ -42,7 +42,7 @@ def save_sequences(sequences, file_path):
with open(file_path, 'w') as file:
json.dump(sequences, file, indent=4)
# data = load_data('/home/markvoltov/GitProjects/framework/test_models/adjacency_matrix.json')
# data = load_data('path_to_adjacency_matrix.json')
# # constraints = load_constraints('constraints.json')
# all_parts = data['allParts']
# print(all_parts)

View file

@ -3,7 +3,7 @@ import networkx as nx
import matplotlib.pyplot as plt
# Загружаем данные из файла
with open('/home/markvoltov/GitProjects/framework/freecad_workbench/freecad/robossembler/simplified_adjacency_matrix.json', 'r') as file:
with open('path_tp_simplified_adjacency_matrix.json', 'r') as file:
data = json.load(file)
# Создаем пустой граф

View file

@ -105,7 +105,7 @@ def main():
# args.print_helper()
# if (aspDir[aspDir.__len__() - 1] != '/'):
# aspDir += '/'
aspDir = "/home/markvoltov/GitProjects/framework/test_models/"
aspDir = "path_to_models/"
sequences = FS.readJSON(aspDir + 'sequences.json').get('sequences')
assemblyDirNormalize = []

View file

@ -122,7 +122,7 @@ def restore_full_sequence(assembly_settings, sequence):
def main():
App.open("/home/markvoltov/GitProjects/framework/test_models/desk_table.FCStd")
if App.ActiveDocument:
intersection_geometry, sequences, topologyMatrix = asm_analysis()

View file

@ -0,0 +1,6 @@
adj_matrix = {
"A": ["B", "C"],
"B": ["C"],
"C": []}
from geometric_feasibility_predicate.main import main as asm_analysis