Skip to content

Joints on parts #53

Description

@ricochet1k

I'd really like to be able to define joints on parts, similar to how build123d does it.

This would help a lot with building assemblies.

I imagine it would look something like this:

const socket = part(() => {
  sketch(() => {
      circle(50)
  })
  extrude(50)
  
  sketch(() => {
      circle(5)
  })
  const hole = cut(5)

  rigid_joint("hole", hole.startEdges().center, /* rotation? */)
})


const plug = part(() => {
  sketch(() => {
      circle(50)
  })
  extrude(50)
  
  sketch(() => {
      circle(5)
  })
  const plug_circle = cut(5)

  rigid_joint("plug_circle", plug_circle.startEdges().center, /* rotation? */)
})

connect(socket, "hole", plug, "plug_circle")

Bonus points if somehow this allows mouse dragging to move the parts around respecting the joints.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions