2 Replies Latest reply on Jun 27, 2017 8:31 PM by Amen Allah Jlili


    Luigi Piron

      Hy to everybody,

      i have just one question , i have a componet where inside there is only one skecth , in my case this sketch is a closed spline ,

      i get the minimun box of the sketch, in this way:

      - 1 get the center of the sketch

      -2 get the normal vector of the sketch

      -3 with a rotation of 1 degree from 0 to 90 i get the minimun box of the sketch

      getting the corner points of my box

      -4 insert the segment points that connect the points of my minimun box

      the problem is that once inserted the segment points ,i measure the lenght of my rectangle box

      and the measure are not the same that i find with the mathtrasform

      any suggestion ??

      yhank you in advance



        • Re: API ISSUE GETBOX
          Peter Brinkhuis

          Can you share the code, a test while where this situation occurs and the values that you expect?

          • Re: API ISSUE GETBOX
            Amen Allah Jlili

            SOLIDWORKS doesn't highlight the bounding box when you only have sketches in the part design mode. Bummer!


            I don't really trust the API's get box. It's not the tightnest fit. If and only if (this could extended to 2D sketch but then you have figure out the plane), you're working with 3DSketch, you can evaluate all the curves between their umin and their umax. Consider refinement of 100 points for example for each curve. You mostly need this for arcs and splines. After you collect all the points, the curves will fall in a box with defined by a lowest corner at (Xmin, Ymin, Zmin) and a highest corner (Xmax, Ymax, Zmax) where the max is the max of the Xs of all the evaluted points. Likewise for Y and Z. The only issue with this approach is how to determine the adequate refinement but overall, I found the results - I've used this for a customer- to be quite statisfatory.


            CADHERO consulting SUARL – CAD Design Automation & Training – SOLIDWORKS API