THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/09/2009 at 12:08, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 11
Platform: Windows ;
Language(s) : C++ ;
---------
Here is the code that I have. I'll explain what it does.
> `
\>
\>
\> for (lngI=0;lngI<lngPolygonCount;lngI++)
\> {
\>
\> if (IsCrossPoly(arrPolygons,arrPoints,lngI,lngSymPlane))
\> {
\> GePrint("Polygon " + LongToString(lngI) + " has crossed the symmetry plane.");
\> arrCrossPolys[lngJ] = lngI;
\> GePrint("arrCrossPoly[" + LongToString(lngJ) + "] = " + LongToString(arrCrossPolys[lngJ]));
\>
\>
\> if (PointOnEditableSide(arrPoints, arrPolygons[lngI].a, lngSymPlane, lngMirroredSide, true))
\> {
\> arrPointStillExists[(lngJ*4)+0]=arrPolygons[lngI].a;
\> }
\> if (PointOnEditableSide(arrPoints, arrPolygons[lngI].a, lngSymPlane, lngMirroredSide, true))
\> {
\> arrPointStillExists[(lngJ*4)+1]=arrPolygons[lngI].b;
\> }
\> if (PointOnEditableSide(arrPoints, arrPolygons[lngI].a, lngSymPlane, lngMirroredSide, true))
\> {
\> arrPointStillExists[(lngJ*4)+2]=arrPolygons[lngI].c;
\> }
\> if (PointOnEditableSide(arrPoints, arrPolygons[lngI].a, lngSymPlane, lngMirroredSide, true))
\> {
\> arrPointStillExists[(lngJ*4)+3]=arrPolygons[lngI].d;
\> }
\>
\> //For testing in the console - can be removed later.
\> GePrint("The points for arrCrossPolys[" + LongToString(lngJ) + "] are:" + LongToString(arrPolygons[lngI].a) +","+ LongToString(arrPolygons[lngI].b) +","+ LongToString(arrPolygons[lngI].c) +","+ LongToString(arrPolygons[lngI].d));
\> GePrint("arrPointStillExists[" + LongToString(arrPointStillExists[lngJ]) + "]");
\>
\>
\> lngJ++;
\> }
\> }
\>
\>
\>
`
This code cycles through the polygons on an object and determines which polygons have crossed a predetermined symmetry plane. Then, it determines which points are part of thos polygons. And contains them in an array.
I would like to now take the polygons that cross the symmetry plane and divide them so that there are points that fall directly on the symmetry plane instead. How would add points in the middle of the already existing polygons?
Any help would be greatly appreciated.
Thanks,
~Shawn