3.17 cppol3d – Polyhedron deep copy¶
The cppol3d routine creates a deep copy of a polyhedron’s geometric and topological structure. It duplicates the connectivity information, vertex coordinates, face normals, and plane distances, ensuring that the new polyhedron is an independent data structure from the original.
Fortran:
call cppol3d(cs,cs0,ipv,ipv0,nipv,nipv0,ntp,ntp0,nts,nts0, &
ntv,ntv0,vertp,vertp0,xns,xns0,yns,yns0,zns,zns0)
C:
cppol3d(cs,cs0,ipv,ipv0,nipv,nipv0,&ntp,&ntp0,&nts,&nts0,
&ntv,&ntv0,vertp,vertp0,xns,xns0,yns,yns0,zns,zns0);
Python:
(cs,ipv,nipv,ntp,nts,ntv,vertp,xns,yns,zns) = voft.cppol3d(cs0,ipv0,nipv0,ntp0,nts0,ntv0,vertp0,xns0,yns0,zns0)
Arguments:
|
|
|
array of length |
|
|
|
array of length |
|
|
|
array of dimensions |
|
|
|
array of dimensions |
|
|
|
array of length \(\texttt{ns}\) storing the number of vertices per face boundary for the copied polyhedron |
|
|
|
array of length \(\texttt{ns}\) storing the number of vertices per face boundary for the original polyhedron |
|
|
|
maximum vertex index in the connectivity list of the copied polyhedron |
|
|
|
maximum vertex index in the connectivity list of the original polyhedron |
|
|
|
total number of face boundaries of the copied polyhedron |
|
|
|
total number of face boundaries of the original polyhedron |
|
|
|
total number of vertices in the copied polyhedron |
|
|
|
total number of vertices in the original polyhedron |
|
|
|
array of dimensions \(({nv},3)\) storing the \(x,y,z\)-coordinates of each vertex of the copied polyhedron |
|
|
|
array of dimensions \(({nv},3)\) storing the \(x,y,z\)-coordinates of each vertex of the original polyhedron |
|
|
|
arrays of length \(\texttt{ns}\) storing the \(x,y,z\)-components of the outward-pointing unit normal vector for each face of the copied polyhedron |
|
|
|
arrays of length \(\texttt{ns}\) storing the \(x,y,z\)-components of the outward-pointing unit normal vector for each face of the original polyhedron |
Note: The source polyhedron is specified by the arguments with suffix 0. The routine copies the vertex coordinates up to ntp0, the face data up to nts0, and the connectivity entries up to nipv0(i) for each face. Entries outside these ranges are not defined by the routine. The plane constants cs0 are copied without recomputation. Fortran and C callers must provide separate storage for the source and destination arrays.