-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a closed loop with rectangular cross section - obtaining two extra unwanted faces #1478
Comments
Try increasing the number of points for the spline profile from 100 to a larger value. (I find >= 109 points results in 4 faces and valid shape). In this case it is simpler to use import cadquery as cq
# Create a rectangle profile for the ring
rectangle_edges = [(9, 0, -1), (9, 0, 1), (11, 0, 1), (11, 0, -1)]
rectangle_profile = cq.Workplane("XY").polyline(rectangle_edges, includeCurrent=False).close()
ring = rectangle_profile.revolve(360, (0, 0, 0), (0, 0, 1)) |
I've seen something like this before when revolving 360 degrees. It came up a while back on this issue #259 I remember trying the I've see this extra faces happen again recently and in the end we made two revolutions and used a union to combine them. Noting that OCP 7.7.2 is just out so it might also be worth trying the latest version |
Thank you! I think I tried something like this hack before but it did not solve the issue in my case. I have seen you had a command on this issue #449 (comment) to remove faces using OCP and Brep files. I tried to do something like that but it did not work though. |
To count faces:
These are seam edges. Seam edges are expected when working with cadquery and OCCT. For example, the seam when creating a cylinder: cyl = cq.Workplane().circle(10).extrude(20) |
Thank you so much, that's really helpful! Is there a way to remove seam edges? |
Nope, that is how B-Rep works. |
Hello! I am relatively new to CadQuery, and I have a question for which I have not found any good example.
I am trying to create a CAD model of a loop with rectangular cross section. Here is a minimal example for a single ring using a sweep operation. In general the shapes I am interested in are more complex, but the topology is the same.
However, the output is not a fully closed loop, but I get two overlapping rectangular faces at the beginning and end of the process.

Basically, the solid now has 4 faces rather than 6.
Here is an example of the file I created opened in FreeCad.
How can I make it a fully closed loop, with only 4 faces?
Thanks!
The text was updated successfully, but these errors were encountered: