For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Add member function in OpenCASCADE original class

fresh's picture

I use Visual C++ 6.0
I want to add data member and member function in the OpenCASCADE original class;
Here is my code.

class Geom_BSplineSurface : public Geom_BoundedSurface
// original code...

// add data member SubBS[2] to store the surfaces
// Split from "this"
Handle(Geom_BSplineSurface) SubBS[2];

// add member function to Generate BSpline
// surfaces for SubBS[2]


void Geom_BSplineSurface::GenerateSubBS()
SubBS[0] = GeomConvert::SplitBSplineSurface
(this, 1, int(NbUPoles()/2), 1, NbVPoles());

Compiling is ok, but it can't be execute. I uesd DeBug to check it out.
The member function
"Geom_BSplineSurface::GenerateSubBS()" I add doesn't work.
error messege pop up:
" Unhandled exception in XXX.exe(KERNEL32.DLL):0xE06D7363:Microsoft C++ Exception "

The declaration of GeomConvert::SplitBSplineSurface

static Handle(Geom_BSplineSurface) SplitBSplineSurface
(const Handle(Geom_BSplineSurface)& S,
const Standard_Integer FromUK1,
const Standard_Integer ToUK2,
const Standard_Integer FromVK1,
const Standard_Integer ToVK2,
const Standard_Boolean SameUOrientation
= Standard_True,
const Standard_Boolean SameVOrientation
= Standard_True);

I'm not familiar with "Handle". Maybe it's the point.
please~ thanks.

HASANI Kreshnik's picture


I think you must create a new class, which inherits from Geom_BSplineSurface. And then you add your data members.

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.