|
|
@ -46,9 +46,6 @@ pub fn create_subassembly(
|
|
|
|
let mut file = File::create(Path::join(&directory, "data.partialworld"))?;
|
|
|
|
let mut file = File::create(Path::join(&directory, "data.partialworld"))?;
|
|
|
|
write_subassembly_file(&mut file, &components, &wires)?;
|
|
|
|
write_subassembly_file(&mut file, &components, &wires)?;
|
|
|
|
|
|
|
|
|
|
|
|
let mut placing_info_file = File::create(Path::join(&directory, "LastMainPlacingInfo.jecs"))?;
|
|
|
|
|
|
|
|
write_placing_info_file(&mut placing_info_file)?;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let mut placements_file = File::create(Path::join(&directory, "placements.jecs"))?;
|
|
|
|
let mut placements_file = File::create(Path::join(&directory, "placements.jecs"))?;
|
|
|
|
write_placements_file(&mut placements_file)?;
|
|
|
|
write_placements_file(&mut placements_file)?;
|
|
|
|
|
|
|
|
|
|
|
@ -101,20 +98,6 @@ fn write_subassembly_file(
|
|
|
|
return Ok(());
|
|
|
|
return Ok(());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn write_placing_info_file(file: &mut impl Write) -> io::Result<()> {
|
|
|
|
|
|
|
|
file.write_all(
|
|
|
|
|
|
|
|
b"PlacingInfo:
|
|
|
|
|
|
|
|
RaiseOnChangedEvents: true
|
|
|
|
|
|
|
|
Flipped: false
|
|
|
|
|
|
|
|
RotationAboutUpVector: 180
|
|
|
|
|
|
|
|
Offset:
|
|
|
|
|
|
|
|
x: 0
|
|
|
|
|
|
|
|
y: 0
|
|
|
|
|
|
|
|
BoardIsFlat: true
|
|
|
|
|
|
|
|
BoardRotationState: 0
|
|
|
|
|
|
|
|
",
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
fn write_placements_file(file: &mut impl Write) -> io::Result<()> {
|
|
|
|
fn write_placements_file(file: &mut impl Write) -> io::Result<()> {
|
|
|
|
file.write_all(
|
|
|
|
file.write_all(
|
|
|
|
b"Placements:
|
|
|
|
b"Placements:
|
|
|
|