Message 1 of 4
Sketch on a plane perpendicular to two co-planar faces (python)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have two bodies that touch each other along a co-planar surface. Selecting 2 faces (one from each body) I need to
- Check that the faces have a common co-planar area that is a rectangle.
- Create a sketch that is perpendicular to the common co-planar area.
Said differently I need a python routine that will create a sketch in the blue area in the diagram after selecting the 2 faces that touch each other. I do not care about how tall the sketch is but it will ultimately extend through the second body.
I can select the two faces - called tongue and groove. I think what I need to do next is this to get a plane that is the intersection is the following ...
# Get construction planes planes = _rootComp.constructionPlanes # Create construction plane input planeInput = planes.createInput() planeInput.setByTwoPlanes(tongue, groove) planes.add(planeInput)
However, I have faces not planes, and the code throws an exception because the arguments are wrong. I cannot find a way to convert from a face to a plane. Solving just that would get me further along.
Thanks
Tony