Closed SalmanBruce closed 7 months ago
I am very sorry for the delay in replying.
We have resolved this issue by improving the tessellation.
By the way, builder::rsweep
does not simplify the topology even if the end point of the wire is on the rotation axis. Therefore, the code leaves an infinitesimal hole in the center of the cylinder. It is safer to use builder::cone
.
let v = builder::vertex(Point3::new(0.0, 0.0, 0.0));
let e0 = builder::tsweep(&v, Vector3::unit_x());
let e1 = builder::tsweep(e0.back(), Vector3::unit_y());
let e2 = builder::tsweep(e1.back(), -Vector3::unit_x());
let w = Wire::from(vec![e0, e1, e2]);
let shell = builder::cone(&w, -Vector3::unit_y(), Rad(7.0));
let cylinder = Solid::new(vec![shell]);
let json = serde_json::to_vec_pretty(&cylinder).unwrap();
std::fs::write("cylinder.json", json).unwrap();
Here's the rsweep issuse case, this cylinder can't be tessellationed, because the pivot line is aligned with the rotation axis, and the center point is coincide,so the
connect_wires
method has wrong results.like this, one side face is not shown.