This is a great piece of work !
But can you please explain how I get create a V3d_Viewer and attach it to my .net form from within c# ?
I can create a V3d_Viewer in C++, create an AIS_Shape and pass it a TopoDS_Shape. But I cant work out how to pass it a TopoDS.Shape from the wrapped dll.
02Author
Hello Colin,
unfortunately I don't have any experience with V3d and AIS packages. These packages are not included in our wrapper, althought it might be easy to add these packeges to the wrapper and generate new dlls. We will think about it.
Let me tell you how we do it: We create a windows form and attach an OpenGL rendering context to it. Then we get triangulation from the TopoDS.Shape objects and display them with OpenGL.
Author
03Commenter-2
Could you post a code example?
Thank you
04Commenter-2
We are trying to make scenes with OpenCascade and finally render the scenes over bitmaps files. All our effort have been lost because all the ways we try need to use a windows form to represent the picture.
Our code is running as a web service so we haven't access to the display.
Do you know how to render a 3D OpenCascade scene over a bitmap objetc without use a control like panel and picturebox, or windows form?
Thank you.
05Author
I would convert the scene to VRML or X3D and let the user choose the view and scroll position. Conversion to VRML does not need a device context or windows form.
Author
06Commenter-2
First of all, thank you very much for the replay Author.
We have exported the scene to vrml but the problem we have encountered is the vrml export lose the colors, 3D text and lines for shirts. (Any idea about that situation?)
The clients are web clients and they haven't enought process capacity.
We are going to try the X3D format. Perhaps this format will be the solution.
Anyway, if you could show us how to represent the OCC shapes from your wrapper over a CImage or similar object, it wil be fantastic.
Commenter-2
07Commenter-1
Hello Author,
Have you had any more thoghts regarding adding V3d and AIS to your wrapper ?
Regards
Commenter-1
08Author
sorry Colin, I had no time yet, just returning from vacation.
Do you know if there is any need for callback functions (OpenCascade code calling back to user code) in V3d or AIS modules? Because we don't implement that in the current wrapper generator.
Author
09Commenter-3
Dear Author
I have one problem when i am writing the gc classes. The problem is as follows, I can not define two classes to each other, it gives me error 2460
I am trying as follows
in the Trsf.h file writing that
Trsf(Trsf2d* T)
{
}
and in Trsf2d.h file i am writing
Trsf2d(Trsf* T)
{
}
so this is give recursive class error
Please if you have a suggestion i would appriciate that
10Commenter-3
Dear Author
I have one problem when i am writing the gc classes. The problem is as follows, I can not define two classes to each other, it gives me error 2460
I am trying as follows
in the Trsf.h file writing that
Trsf(Trsf2d* T)
{
}
and in Trsf2d.h file i am writing
Trsf2d(Trsf* T)
{
}
so this is give recursive class error
Please if you have a suggestion i would appriciate that
11Commenter-2
Could you show us how to make the triangulation operation over a shape?
We know how to make the operation under c++, but we don't find the "wrapper" way. Could you help me with a code example?
Over c++ we have coded:
TopLoc_Location loc;
TopoDS_Face f = TopoDS::Face( ExFaces.Current());
ExFacss.Next();
Handle(Poly_Triangulation) tri = BRep_Tool::Triangulation(f, loc);
Dear Author
I have one problem when i am writing the gc classes. The problem is as follows, I can not define two classes to each other, it gives me error 2460
I am trying as follows
in the Trsf.h file writing that
Trsf(Trsf2d* T)
{
}
and in Trsf2d.h file i am writing
Trsf2d(Trsf* T)
{
}
so this is give recursive class error
Please if you have a suggestion i would appriciate that
15Commenter-3
Dear Author
I have one problem when i am writing the gc classes. The problem is as follows, I can not define two classes to each other, it gives me error 2460
I am trying as follows
in the Trsf.h file writing that
Trsf(Trsf2d* T)
{
}
and in Trsf2d.h file i am writing
Trsf2d(Trsf* T)
{
}
so this is give recursive class error
Please if you have a suggestion i would appriciate that
16Commenter-3
Dear Author
I have one problem when i am writing the gc classes. The problem is as follows, I can not define two classes to each other, it gives me error 2460
I am trying as follows
in the Trsf.h file writing that
Trsf(Trsf2d* T)
{
}
and in Trsf2d.h file i am writing
Trsf2d(Trsf* T)
{
}
so this is give recursive class error
Please if you have a suggestion i would appriciate that
17Commenter-5
Why is that recursive - all that says is that you have defined two classes, each of which can be constructed from a pointer to the other. What you should be looking for are circular references in the class definition, e.g. class Trsf2d : public Trsf;
Have you forward referenced the classes to each other as needed?
Pete
18Commenter-3
Dear Pete
Thanks for your kind reply, what i tried your suggesstion but still with a Error, i want to forward referenced classes to each other
19Commenter-5
Have you tried a Trsf.h file that looks like
class Trsf2d;
class Trsf
{
public:
Trsf(Trsf2d* T);
.
.
};
and Trsf2d.h
class Trsf2d;
class Trsf2d
{
public:
Trsf2d(Trsf* T);
.
.
};
with the actual #include "Trsf2d.h" in Trfg.cpp and vice versa?
Pete
20Commenter-5
For the seconf bit, that should have read
class Trsf;
class Trsf2d
{
public:
Trsf2d(Trsf* T);
.
.
};
21Commenter-3
Dear Author
First of all i would like to express my thanks to you at early time help. I almost finish one application using OCC, it is not commericial but rather it is help for creating some geometrical model for other code. I wanted to ask you a question, and i am willing your answer as usual. How can i put my code into other machine does not have OCC on it
Best. My E-mail address has been changed to that one
Commenter-3