Projecting construction geometry to another sketch

311 views
Skip to first unread message

Lap Joint

unread,
May 2, 2022, 7:56:41 AM5/2/22
to CadQuery
Hi,

I am just trying to get a grasp of CadQuery, so hopefully this is not a stupid question.

Trying to replicate a workflow that I do in parametric CAD (Onshape, FreeCAD etc.) all the time, I wanted to do the following:
  1. Create a constraint-based sketch Sketch 1 as demonstrated in the documentation, including some construction geometry.
  2. Create a second sketch Sketch 2 on a workplane that is offset from Sketch 1 by a certain distance.
  3. Project some of the geometry from Sketch 1 into Sketch 2.
  4. Create a loft between the two sketches.
Steps 1 and 2 are easy enough following the documentation, but how would I do Step 3? I have two ideas, but I couldn't figure out how to do either of those:
  1. Just refer to the sketch elements by their tags and somehow include or project them into Sketch 2 directly.  – or, if that is not possible:
  2. Refer to the sketch elements from Sketch 1 by their tags, extract the coordinates after solving the constraints, and construct matching elements in Sketch 2.
Is any one of these possible in CadQuery?

Thanks!

Lap Joint

Roger Maitland

unread,
May 3, 2022, 8:28:28 PM5/3/22
to CadQuery
I don't know of a way to extract part of a sketch and place it into another sketch. However, could a third sketch common to the other two solve this problem (as sketches can be combined)?  There is an example of lofting between two sketches at the bottom of this page: https://cadquery.readthedocs.io/en/latest/sketch.html
Reply all
Reply to author
Forward
0 new messages