Search results

  1. A

    Convert Handle(Geom2d_BSplineCurve) to Handle(Geom2d_Curve)

    [SOLVED] With proper header inclusion, the following code works. No downcasting required. ... #include <Geom_Plane.hxx> #include <Geom2dAPI_Interpolate.hxx> #include <Geom2d_BSplineCurve.hxx> #include <BRepBuilderAPI_MakeEdge.hxx> ... // a plane gp_Pln gp_plane = ... const Handle(Geom_Plane)...
  2. A

    Convert Handle(Geom2d_BSplineCurve) to Handle(Geom2d_Curve)

    @JSlyadne thank you for your suggestions Yes I see. This is probably due to my mind set of Java guy. Regarding the "&", the statement you suggested above in this thread: const Handle(Geom2d_Curve)& scurve = Handle(Geom2d_Curve)::DownCast(interp.Curve()); should then be the following: const...
  3. A

    Convert Handle(Geom2d_BSplineCurve) to Handle(Geom2d_Curve)

    @JSlyadne so, also this is wrong: Handle(Geom_Surface) splane = new Geom_Plane(plane); Should it be? Handle(Geom_Surface) &splane = Handle(Geom_Surface)::DownCast(new Geom_Plane(plane));
  4. A

    Convert Handle(Geom2d_BSplineCurve) to Handle(Geom2d_Curve)

    The problem is that BRepBuilderAPI_MakeEdge wants a Handle(Geom2d_Curve)& and the following line const Handle(Geom2d_Curve)& scurve = interp.Curve(); doesn't work. Visual Studio complains as follows: "no suitable user-defined conversion from to exists"
  5. A

    Convert Handle(Geom2d_BSplineCurve) to Handle(Geom2d_Curve)

    Thank you @blobfish I'll try the solution: const Handle(Geom2d_BSplineCurve) &curve = interp.Curve(); //preferred
  6. A

    Convert Handle(Geom2d_BSplineCurve) to Handle(Geom2d_Curve)

    Hello, I have this problem: // a plane gp_Pln plane = ... // a collection of 3 points Handle(TColgp_HArray1OfPnt2d) points = new TColgp_HArray1OfPnt2d(1,3); points->SetValue(1, ... ); points->SetValue(2, ... ); points->SetValue(3, ... ); // a 2d interpolating curve Geom2dAPI_Interpolate...
Top