A difficulty in polyhedron chamfering

127 Views Asked by At

I am trying to write a program to chamfer a given polyhedron, but I got stuck, and would like some help.

My understanding of the process of chamfering is like so:

  1. shrink the given polyhedron's faces by a factor $r$, $0<r<1$
  2. translate the shrunken faces outward, so that their edges are coplanar with the original polyhedron's edges
  3. construct the required hexagons from the original polyhedron's vertices and the vertices of the shrunk faces.

My problem is with step 2. I understand that I need to translate the shrunken faces in the direction of their respective normals, but I am unable to derive the equations representing the coplanarity requirement, much less the translation needed. I believe the dihedral angle of two adjacent faces is somehow involved, but I am not sure how. I will be grateful for any ideas, references, or both.

2

There are 2 best solutions below

0
On

I am not an expert at this, so I can only tell you my intuition.

Say you have a polyhedron (e.g. a cube). Instead of shrinking the face and translating it, you can imagine starting from each vertex $v$, there are three vectors growing from $v$, symmetrically and with the same speed (This ensures $|\overrightarrow{vv_1}|=|\overrightarrow{vv_2}|=|\overrightarrow{vv_3}|$). That is, you do not need to translate the face manually. You just control such vectors and let the endpoint of the vectors form the desired face for you.

As long as we set up appropriate directions for $\overrightarrow{vv_1}$, $\overrightarrow{vv_2}$, and $\overrightarrow{vv_3}$ (so as for $\overrightarrow{uu_1}$, $\overrightarrow{uu_2}$, and $\overrightarrow{uu_3}$), we can make sure that $u,u_1,u_2,v,v_1,v_2$ coplanar. Imagine we connect $u$ and $v$ in the following plot. Then we have $|u_1v_1|/|uv|=r\in(0,1)$. I hope this would help.

(Please forgive my bad drawing and poor English. T_T)

enter image description here

P.S. I just realized that if you extend all such vector to the end, i.e., set $r\to 0$, in the following figure, you can obtain a larger polyhedron (perhaps a larger cube). Such so-called chamfering can somewhat be regarded as cutting the vertices of the larger cube?! with the cut faces squares.

0
On

If using solid geometry operations, I would apply the chamfer operation to each edge of the polytope.

Define $r$ the distance along each face, perpendicular to the edge, that is removed by the chamfer. Then, the chamfer is essentially a prism, with an equilateral triangle cross section, with the two short equal sides of length $r$. The long side of the triangle cross section depends on the angle at which the edges meet.

If the polytope has a point $(x_0, y_0, z_0)$ such that any line segment from that point to any point on the polytope surface is completely contained within the polytope, we can call $(x_0, y_0, z_0)$ its "center", and treat each face as a polygonal pyramid with the face as the base and apex at the center. If each face of the polytope shares at most one edge with its neighboring faces, the chamfering prism can be extended to infinity (sufficiently far is okay), and applied only the two pyramids whose shared edge is being chamfered.


If we are only manipulating the face polygons instead, then we need to shrink each face by $r$ (or offset by $-r$, the nomenclature varies between libraries). Edges that were in contact will get an additional rectangular face (the chamfer; opposite ends $2 r$ in length). There will be leftover "holes" at vertices, which need to be plugged by a planar face.

While mathematically/geometrically/logically this sounds quite different than above, this should yield the same result as the solid geometry approach, except with additional chamfering of some of the vertices.

(If in the solid geometry the chamfering prism isn't extended, but old remains at each vertex cut off along the perimeter defined by the chamfering prism ends, then the two results should be identical, I think.)