Skip to content
Discussion options

You must be logged in to vote
normal_vector = cq.Vector(1, 0, 0)
x_direction_vector = cq.Vector(0, 1, 0)

The vectors can be automatically computed from face normal and edge tangents to simplify the code.

origin = bottom.faces(">X")[0].edges(">Z")[0].val().Center()

The orgin can also be computed from the edge. See the example below with positionAt(0.5) for edge midpoint.

which edge to use is under constrained

See example below to select a single edge:

e = f.edges("<X").edges(">Y")  # edge to orient dovetail

Here is a rough experimental example of a function that might be reused for this purpose.

from cadquery import Sketch, Workplane
from cadquery.func import *
from typing import Tuple


def dovetail(
    shapes: T…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@hartzell
Comment options

@hartzell
Comment options

@lorenzncode
Comment options

@lorenzncode
Comment options

Answer selected by hartzell
@hartzell
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants