Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prototype of OpLog + EvolutionLog #54

Closed
wants to merge 3 commits into from
Closed

Add prototype of OpLog + EvolutionLog #54

wants to merge 3 commits into from

Conversation

MattFerraro
Copy link
Collaborator

@MattFerraro MattFerraro commented May 29, 2024

This is a first pass at implementing the OpLog and EvolutionLog notionally described here

It doesn't really break or change anything as is, but it would allow us to eventually deprecate Messages entirely and serve as the foundation of version control for CADmium

When you run cargo run you should get a nice git log style display:

Root:
* e9fe56: Create: Hello World
* 4f66a9: CreateWorkspace: Workbench 1
* ad71cb: SetWorkspaceName: 4f66a9 'Main Workbench'
* c7f346: CreatePlane: 4f66a9 the top plane
* bee7c6: SetPlaneName: c7f346 'Top'
* 81ea01: SetPlane: c7f346
* f54c1a: CreateRealPlane: c7f346 RealPlane { plane: Plane { origin: Point3 { x: 0.0, y: 0.0, z: 0.0, hidden: false }, primary: Vector3 { x: 1.0, y: 0.0, z: 0.0 }, secondary: Vector3 { x: 0.0, y: 1.0, z: 0.0 }, tertiary: Vector3 { x: 0.0, y: 0.0, z: 1.0 } }, name: "c7f346c93d1f000800dc854f1a44e84032bbac1a8587441fde39ec928e3417ac", width: 90.0, height: 60.0 }
* 585663: CreateSketch: 4f66a9 top sketch
* 47c5d1: SetSketchName: 585663 'Original Sketch'
* fdc492: SetSketchPlane: 585663 f54c1a
* 37177d: AddSketchLine: 585663 (0, 0) to (0, 100)
* 2206a9: AddSketchLine: 585663 (0, 100) to (100, 100)
* 33c267: AddSketchLine: 585663 (100, 100) to (100, 0)
* e3a3e2: AddSketchLine: 585663 (100, 0) to (0, 0)
* 7b490b: CreateRealSketch: 585663 "(1, Point3 { x: 0.0, y: 0.0, z: 0.0, hidden: false })(2, Point3 { x: 0.0, y: 100.0, z: 0.0, hidden: false })(3, Point3 { x: 100.0, y: 100.0, z: 0.0, hidden: false })(4, Point3 { x: 100.0, y: 0.0, z: 0.0, hidden: false })"
* b01534: CreateExtrusion: 4f66a9 first extrusion
* ff4f84: SetExtrusionName: b01534 'Extrude1'
* dd7d1d: SetExtrusionDepth: b01534 100
* c63a96: SetExtrusionSketch: b01534 7b490b
* 7f7210: SetExtrusionFaces: b01534 0
* a7d410: CreateSolid: Extrude1:0 Volume: 1000000.0
* ee963d: CreateTruckFace: 4f66a9 a7d410 lengths: [4]
* ecb0d5: CreateTruckFace: 4f66a9 ee963d lengths: [4]
* 9b9148: CreateTruckFace: 4f66a9 ecb0d5 lengths: [4]
* 76486d: CreateTruckFace: 4f66a9 9b9148 lengths: [4]
* 81b21c: CreateTruckFace: 4f66a9 76486d lengths: [4]
* 5014f0: CreateTruckFace: 4f66a9 81b21c lengths: [4]

And you should be able to see a nice first_solid.obj on disk, which should be a simple cube

@MattFerraro MattFerraro requested a review from dzervas May 29, 2024 03:48
@MattFerraro MattFerraro changed the title add prototype of OpLog + EvolutionLog Draft: add prototype of OpLog + EvolutionLog May 29, 2024
@MattFerraro MattFerraro changed the title Draft: add prototype of OpLog + EvolutionLog WIP: add prototype of OpLog + EvolutionLog May 29, 2024
@MattFerraro MattFerraro marked this pull request as draft May 29, 2024 04:11
@MattFerraro MattFerraro changed the title WIP: add prototype of OpLog + EvolutionLog Add prototype of OpLog + EvolutionLog May 29, 2024
@MattFerraro
Copy link
Collaborator Author

All the stuff with CommitNode is because I have never used an Rc in my life and at this point I'm too scared to ask

@MattFerraro
Copy link
Collaborator Author

Closing because this work has been superseded by @dzervas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant