Extrudecurvestraight function


#1

I find extrudecurvestraight function just can extrude a brep in one direction,Is there a C++ function can extrude a brep in both side?


(Steve Baer) #2

Have you tried ON_BrepExtrudeFace? You may also want to consider using extrusion objects ON_Extrusion for this


#3

thanks for you answer.
but I think N_BrepExtrudeFace and ON_Extrusion are not my need .
I write this function myself like that:
first I using extrudecurvestraight function extrude two breps
(using the same curve ,surmise one brep extrude in v direction ,another brep extrude in -v direction)
then I using rhinojoinbreps jointhe two breps


(Steve Baer) #4

Just temporarily transform the curve before performing the extrusion with RhinoExtrudeCurveStraight


#5

stevebaer:
but how to transform the curve ,can you say cleary?
Thanks


#6

What I do is:

  1. get the extrusion vector - not unified, as if you were going to
    extrude only one side
  2. invert the vector
  3. translate the curve to be extruded in the inverted vector direction
  4. scale the extrusion vector by 2 and use that to extrude.

–Mitch


#7

thanks,that a good idea