@@ -18,12 +18,12 @@ def process_output(meshes: list[DualContouringMesh], n_stack: int, solutions: So
18
18
unstructured_data_meshes : UnstructuredData = _meshes_to_unstruct (meshes , logger )
19
19
if PLOT_SUBSURFACE_OBJECT :
20
20
_plot_subsurface_object (unstructured_data_meshes )
21
- body_meshes , header_meshes = unstructured_data_meshes .to_binary ()
22
- header_json = json .dumps (header_meshes )
23
- header_json_bytes = header_json .encode ('utf-8' )
24
- header_json_length = len (header_json_bytes )
25
- header_json_length_bytes = header_json_length .to_bytes (4 , byteorder = 'little' )
26
- body_meshes = header_json_length_bytes + header_json_bytes + body_meshes
21
+ body_meshes = unstructured_data_meshes .to_binary ()
22
+ # header_json = json.dumps(header_meshes)
23
+ # header_json_bytes = header_json.encode('utf-8')
24
+ # header_json_length = len(header_json_bytes)
25
+ # header_json_length_bytes = header_json_length.to_bytes(4, byteorder='little')
26
+ # body_meshes = header_json_length_bytes + header_json_bytes + body_meshes
27
27
28
28
# * serialize octrees
29
29
unstructured_data_volume = subsurface .UnstructuredData .from_array (
@@ -35,12 +35,12 @@ def process_output(meshes: list[DualContouringMesh], n_stack: int, solutions: So
35
35
) # TODO: We have to create an array with the shape of simplex array with the id of each simplex
36
36
)
37
37
38
- body_volume , header_volume = unstructured_data_volume .to_binary ()
39
- header_json = json .dumps (header_volume )
40
- header_json_bytes = header_json .encode ('utf-8' )
41
- header_json_length = len (header_json_bytes )
42
- header_json_length_bytes = header_json_length .to_bytes (4 , byteorder = 'little' )
43
- body_volume = header_json_length_bytes + header_json_bytes + body_volume
38
+ body_volume = unstructured_data_volume .to_binary ()
39
+ # header_json = json.dumps(header_volume)
40
+ # header_json_bytes = header_json.encode('utf-8')
41
+ # header_json_length = len(header_json_bytes)
42
+ # header_json_length_bytes = header_json_length.to_bytes(4, byteorder='little')
43
+ # body_volume = header_json_length_bytes + header_json_bytes + body_volume
44
44
45
45
# * serialize global header
46
46
body = body_meshes + body_volume
0 commit comments