Fri, 05/04/2018 - 19:42
Hi all,
I'm trying to split an edge on a cylinder. I've seen some posts concerning splitting edges of shapes, and I've been using those to construct my code.
I can successfully split an edge on a box, however, when I try to do the same thing on a cylinder, I get an invalid shape that is unorientable and is missing curves according to BRepCheck_Analyzer. I'm making the cylinder with TopoDS_Solid cyl = BRepPrimAPI_MakeCylinder(gp_Ax2(gp_Pnt(0.0, 0.0, 0.0), gp_Dir(0.0, 0.0, 0.1)), 2.0, 8.0).Solid().
I'm simply using the code posted here https://forum.freecadweb.org/viewtopic.php?t=3264, and instead of creating a box, I'm creating a cylinder.
If anyone has any insight into why I can split an edge on the box primitive, but not the cylinder primitive, that would be super helpful.
Thanks!
Adam
Sat, 05/05/2018 - 07:02
In case someone comes across this and has the same issue, this wasn't working because pcurves needed to be added for both of the new edges. It works fine for the box because the connected faces are planes, but the cylinder requires these to be fully defined. Here is the code in case anyone is interested.