Closed bourbonut closed 3 years ago
Hello dear user.
Your code is not wrong at all. This is the correct usage except blendpair
doesn't handle closed lines yet. It's working fine for two curves, but not for loops.
So the matching between the points of each lines are made quite randomly (like one point of a circle matched to the opposite point of the other circle)
Well I just worked to add the ability to handle closed lines: (commit 1d8af58bdcb6f7df991d5ef0113b7d1942b484d3)
This will be in the next release ;) you can also use it immediately if you clone the latest github version
Oh and by the way, thanks for having reported this :+1:
I didn't noticed yesterday, but there is an other issue.
Not a bug this time, but a small little thing in your code: you are blending between 2 circles with the same winding (both normals in the same direction, vec3(0,0,1)
in this case)
Everywhere in madcad, faces outlines are oriented using their winding. It means in this case that the inner circle must rotate in the opposite direction to the outer circle. Else the inner circle is considered to be an outer line as the other one, leading to an incorrect output.
This should work better:
from madcad import *
circle1 = Circle((vec3(0,0,0),vec3(0,0,-1)),5) # inner rotates negatively around z
circle2 = Circle((vec3(0,0,0),vec3(0,0,1)),20) # outer rotates positively around z
z = blendpair(circle1, circle2, tangents = "straight")
z = extrusion(vec3(0,0,10), z)
show([z])
Hello, I was trying some functions to make a part.
madcad version 0.7
Here is my code:
The following image is the result:![example](https://user-images.githubusercontent.com/78030392/113141453-02e86b00-922a-11eb-984f-93fc9459185e.png)
The hole is not empty and there are some strange lines near the central circle as you can see. Maybe is my code wrong ?