1 Reply Latest reply on Dec 2, 2013 4:22 AM by Simon Turner

    Extrude to Surface

    Timothy Root

      Does anyone have any example code that would demonstrate how to extrude to a surface.  The particular method I am trying to use is:


      void FeatureExtruRefSurface2(

         System.bool Sd,

         System.bool Flip,

         System.bool Dir,

         System.int T1,

         System.int T2,

         System.double D1,

         System.double D2,

         System.bool Dchk1,

         System.bool Dchk2,

         System.bool Ddir1,

         System.bool Ddir2,

         System.double Dang1,

         System.double Dang2,

         System.bool OffsetReverse1,

         System.bool OffsetReverse2,

         System.bool TranslateSurface1,

         System.bool TranslateSurface2,

         System.bool CapEnd1,

         System.bool CapEnd2,

         System.bool DeleteOriginalFace,

         System.bool KnitResult



      I got code working to blind extrude a set depth.  But what I want to do is extrude to a specified surface.  I see that I can set T1 (Termination Type) to swEndCondUpToSurface but I can't figure out how you provide a reference to the surface.  Any code examples or hints would be great.  Code examples for other extrude functions would also probably get me on the right track.




        • Re: Extrude to Surface
          Simon Turner

          You will need to pre-select the surface (using ModelDocExtension:SelectByID2 or Feature.Select2 or Entity.Select4).

          Mark the surface with the number 1


          For example:

          boolstatus = Part.Extension.SelectByID2("Surface-Extrude1", "SURFACEBODY", -5.58959984629155E-02, 7.23360501640968E-02, -4.97245724994855E-03, True, 1, Nothing, 0)

          Part.FeatureExtruRefSurface2 True, False, False, 4, 0, 0.121, 0.121, False, False, False, False, 1.74532925199433E-02, 1.74532925199433E-02, False, False, False, False, False, False, False, False