VulcanCAD: Difference between revisions

From Adam Colton
Jump to navigation Jump to search
No edit summary
No edit summary
Line 22: Line 22:


=== Sketch ===
=== Sketch ===
https://en.wikipedia.org/wiki/Geometric_constraint_solving
Like FreeCAD. Think about face cuts - I may want to make a sketch and add references that will be extruded later.
Like FreeCAD. Think about face cuts - I may want to make a sketch and add references that will be extruded later.



Revision as of 04:19, 9 March 2018

Primitives

Any primitive has a base unit associated with it (mm, in, feet). That way if you import a metric screw into an imperial project, it will still be the right size

There a bunch of really basic primitives:

  • lengths
  • points 2D and 3D
  • angles
  • curves
  • faces
  • planes

So I'm thinking of diving this into primitives and elements. Elements are things that appear in the tree. Elements are defined as functions. So a sketch function takes in some parameters and returns a sketch. A screw-join construction operation will take some parts and screws and screw them together and return a new part.

Faces

I'll need to do a bunch of research, but I think faces can be defined parametrically. There will probably be both polar and Cartesean, but I'm not sure it matters because it will be [(0,0):(1,1)] either way.

Parameters

The hierarchy of values. I want to be able to do stock.ply.heavy.thickness.

There may need to be some division here. Stock parts, target measurements, derived measurements.

Sketch

https://en.wikipedia.org/wiki/Geometric_constraint_solving

Like FreeCAD. Think about face cuts - I may want to make a sketch and add references that will be extruded later.

There should be a way to view a sketch with a background reference. An image, another sketch, a face from a part.

Part

This is a solid. For organizational purposes, a part is also tagged as stock, machined or constructed. Stock means it's something we can buy - hinges, screws, boards. Machined is something that is created in a single step; 3D-printed, CNC milled, cast. Constructed parts are created by a construction process - sawing, drilling, gluing, lathing and probably a whole bunch more.

Assembly

An assembly places parts in a 3D space. Parts can follow assembly paths and can be connected by linkages. These are woven together; if you have a linkage with two arms and only one is connected, the connected arm will be constrained but the unconnected will not.

Animation

An animation takes an assembly and applies movements to it's constraints. An animation also controls the movements of a camera.

An animation can provide a helpful view of the assembly of project and see how it moves after assembly. It can also provide a sort of unit test; you can move a part through a range of motion and assert that it should not collide with any surfaces, or check the motion of some other part.

Sweep

Single
Takes a single path and an initial vector and sweeps so the vector stays tangent to the motion
Double
Takes two paths and sweeps so that vector points from the first to the second and the scale is proportional to the starting vector
Triple
Takes three paths that return a full translation matrix, so one path is the origin, the second is X and the third is Y

In reality, there is only a 3-path sweep, but we can use 1 or 2 paths to derive the correct 3 path sweep.

Construction and Deconstruction

Part initialization:

  • Extrusion of a sketch
  • Rotation of a sketch
  • Sweep a sketch
  • Boolean combination of Parts
  • Construction
  • Deconstruction

Construction corresponds to the physical transformation of one part into another. This can be cutting a piece out, gluing two pieces together, or any other operation.

Deconstruction reverses construction operations but serves a more complex workflow. Deconstruction takes a part that was defined in one way and breaks it down differently. For instance, we could make a sphere from sheets of plywood. We create a sphere (rotation of sketch) then deconstruct it by taking slices. By deconstructing a fillet, we can map those slices to cylinders, and then place those cylinders on a board tracing the construction back to stock parts.

One thing I haven't figured out is back propagation. Say we're building a box that has 3 holes that need to line up, but they are placed relative to another piece in the final construction. Those holes should be drilled before the 3 pieces are joined to the construction or assembly.

Build Plan

One of the things I really want that should set this apart is the ability to output a build plan. This lets the user take all the construction steps and set them out linearly. We should also be able to add steps (for things like sanding or painting that may not be worth adding to the design). Add notes to a step. Merge multiple steps (like drilling a bunch of holes at once).

I may also want to thing about either jigs or reversed steps. Jigs would be building up something used in the construction, but not the final build. Reversed steps would be something like joining (screws, tape) parts together temporarily to perform operations on all of them (matched cuts or drilling).

We should also be able to use this to help guide considerations at each construction step. A saw cut should include a kerf. A gluing action should provide a plan for clamping.

Not sure if this goes here, but we should also be able to add drafting marks.

I would love to do approximations of planar projections (or what ever the actual name is). Take a mesh and either project it on wood (with edge bevel) or paper (with glue tabs).

Spatial References

I want to do this a little differently. My way is probably less intuitive, but ultimately simpler. I want to avoid adding references until as late as possible. So sketches aren't defined in a plane. And extrusions only happen in one direction.

Parts can be moved and rotated when placed in an assembly or during a boolean or construction operation.

Named References

Everything should be named. Try to do this intelligently.

When creating a board, it's faces should automatically be "front,back,top,bottom,left,right".

Work Spaces

Work spaces are associated with elements. And an instance of an element has an instance of a work space. This allows specific options to be set. Like what backgrounds to show when editing a specific sketch. For a join operation we can choose which part is fixed and which is free.

Advanced Vectors

I can easily represent functions of up to 6 degrees (x,y,z,r,g,b). And vectors allow for some pretty sophisticated mapping. A curve laid out in a sketch could be used to control animation in an assembly.