public new void setSTL(STLSurf s)
 {
     //std::cout << "PointDropCutter::setSTL()\n";
     surf = s;
     root.setXYDimensions();             // we search for triangles in the XY plane, don't care about Z-coordinate
     root.setBucketSize((int)bucketSize);
     root.build(s.tris);
 }
示例#2
0
 /// set the STL-surface and build kd-tree
 public virtual void setSTL(STLSurf s)
 {
     surf = s;
     foreach (Operation op in subOp)
     {
         op.setSTL(s);
     }
 }
 /// set the STL-surface and build kd-tree to enable optimized algorithm
 public new void setSTL(STLSurf s)
 {
     Console.Write("bdc::setSTL()\n");
     surf = s;
     root.setXYDimensions();             // we search for triangles in the XY plane, don't care about Z-coordinate
     root.setBucketSize((int)bucketSize);
     root.build(s.tris);
     Console.Write("bdc::setSTL() done.\n");
 }
        /// \brief call dropCutter on all Triangles in an STLSurf
        /// drops the MillingCutter at Point cl down along the z-axis
        /// until it makes contact with a triangle in the STLSurf s
        /// NOTE: no kd-tree optimization, this function will make
        /// dropCutter() calls for each and every Triangle in s.
        /// NOTE: should not really be used for real work, demo/debug only

        // TESTING ONLY, don't use for real
//C++ TO C# CONVERTER WARNING: 'const' methods are not available in C#:
//ORIGINAL LINE: bool dropCutterSTL(CLPoint &cl, const STLSurf &s) const
        public bool dropCutterSTL(CLPoint cl, STLSurf s)
        {
            bool result = false;

            foreach (Triangle t in s.tris)
            {
                if (this.dropCutter(cl, t))
                {
                    result = true;
                }
            }
            return(result);
        }
 /// set the STL-surface and build kd-tree
 public new void setSTL(STLSurf s)
 {
     surf = s;
     // std::cout << "BPC::setSTL() Building kd-tree... bucketSize=" << bucketSize << "..";
     root.setBucketSize((int)bucketSize);
     if (x_direction)
     {
         root.setYZDimensions();                 // we search for triangles in the XY plane, don't care about Z-coordinate
     }
     else if (y_direction)
     {
         root.setXZDimensions();
     }
     else
     {
         Console.WriteLine("ERROR: setXDirection() or setYDirection() must be called before setSTL()");
         Debug.Assert(false);
     }
     // std::cout << "BPC::setSTL() root->build()...";
     root.build(s.tris);
     // std::cout << "done.\n";
 }
示例#6
0
 /// set the STL-surface and build kd-tree
 public new void setSTL(STLSurf s)
 {
     surf = s;
     Console.Write("BPC::setSTL() Building kd-tree... bucketSize=");
     Console.Write(bucketSize);
     Console.Write("..");
     root.setBucketSize((int)bucketSize);
     if (x_direction)
     {
         root.setYZDimensions();
     }
     else if (y_direction)
     {
         root.setXZDimensions();
     }
     else
     {
         Console.Write("ERROR: setXDirection() or setYDirection() must be called before setSTL()");
         Debug.Assert(false);
     }
     Console.Write("BPC::setSTL() root->build()");
     root.build(s.tris);
     Console.Write(" done.\n");
 }