Can Dolphin do this?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Can Dolphin do this?

askoh
Administrator
Hi:

I have a motion simulator written in VisualWorks Smalltalk. I would
like to make motion addons for CAD programs like Solidworks, Inventor
etc. which are mainly Windows C++ programs.
Can Dolphin create *.dll that these CAD's can call to access the motion
functions?
Can the Dolphin *.dll callback into the CAD's programs and their dll's
to modify the CAD functions and appearances?
Can the *.dll access the motion functions via COM?
How can I test if it is possible to do the above?

All the best,
Aik-Siong Koh
http://askoh.com


Reply | Threaded
Open this post in threaded view
|

Re: Can Dolphin do this?

Chris Uppal-3
askoh wrote:

> Can Dolphin create *.dll that these CAD's can call to access the motion
> functions?

Dolphin cannot create arbitrary DLLs.

If the CAD program has a COM-based pluggin architecture then there's a good
chance that Dolphin can be used to create a COM implementation of the
CAD-vendor's defined interfaces.


> Can the Dolphin *.dll callback into the CAD's programs and their dll's
> to modify the CAD functions and appearances?

Dolphin can normally call code in external DLLs without difficulty.


> Can the *.dll access the motion functions via COM?

Almost certainly -- if the functions are defined via COM then Dolphin should be
able to invoke them.

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Can Dolphin do this?

Chris Uppal-3
In reply to this post by askoh
askoh wrote:

> I have a motion simulator written in VisualWorks Smalltalk.

I didn't think to mention:

I think that motion simulation is processor, and floating-point, intensive.  If
so then speed might be an issue.   Dolphin is in general rather slower than VW
(last time I looked, the difference was about 3x for one application).  It
might be that ST-MT (which is faster than Dolphin[*], and which /can/ create
DLLs) would be a better choice.

    -- chris

(And probably faster than VW, too, for floating-point intensive stuff -- at
least if you use the language extensions)


Reply | Threaded
Open this post in threaded view
|

Re: Can Dolphin do this?

Mike Hales-4
In reply to this post by askoh
This is really good fit for Smalltalk MT.  It works really well with
C++ and COM and is fast.  I'll be giving my experience report about an
application built with MT at Smalltalk Solutions this year.

Mike


Reply | Threaded
Open this post in threaded view
|

Re: Can Dolphin do this?

askoh
Administrator
In reply to this post by askoh
Thanks for the good responses and advice.

I have done some reading to solve my problem and deduced that Smalltalk
MT would be most suitable. So I downloaded their 5.2 evaluation version
and tried their SimpleCOMServer example. But it did not work. I
contacted their support at Genify.com and got a response that it indeed
has a problem. It has been almost two weeks and no resolution. I am
hoping that the community can be of help me with some concrete examples
or tutorials to create a Smalltalk (any dialect) *.dll that Windows CAD
programs can access to do motion simulation.

All the best,
Aik-Siong


Reply | Threaded
Open this post in threaded view
|

Re: Can Dolphin do this?

Chris Uppal-3
askoh wrote:

> I have done some reading to solve my problem and deduced that Smalltalk
> MT would be most suitable. So I downloaded their 5.2 evaluation version
> and tried their SimpleCOMServer example. But it did not work. I
> contacted their support at Genify.com and got a response that it indeed
> has a problem. It has been almost two weeks and no resolution. I am
> hoping that the community can be of help me with some concrete examples
> or tutorials to create a Smalltalk (any dialect) *.dll that Windows CAD
> programs can access to do motion simulation.

No reply here, so it might be worth asking again in comp.lang.smalltalk.

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Can Dolphin do this?

Schwab,Wilhelm K
>>I have done some reading to solve my problem and deduced that Smalltalk
>>MT would be most suitable. So I downloaded their 5.2 evaluation version
>>and tried their SimpleCOMServer example. But it did not work. I
>>contacted their support at Genify.com and got a response that it indeed
>>has a problem. It has been almost two weeks and no resolution. I am
>>hoping that the community can be of help me with some concrete examples
>>or tutorials to create a Smalltalk (any dialect) *.dll that Windows CAD
>>programs can access to do motion simulation.

One option might be to write a simple wrapper DLL in C* and then call
into a COM-based Dolphin DLL from it.  I would try to keep the COM
interface(s) as late bound as possible, at least to start.  You might
start with IDolphinObject::Perform(lpcstr method, SAFEARRAY args) - or
whatever the correct IDL would be.  If it works, you could start to
trade earlier binding for performance.  If they make a few "big" calls,
it won't buy you much, but if they make lots of little ones, it could
make a big difference.

Early on, check with Blair on threading models in case there are any
limitations that might stop you.

Are you writing this for your own use (not consumers)?  If so, you might
consider a C* DLL that makes a socket connection to a local Dolphin image.

Good luck!

Bill


--
Wilhelm K. Schwab, Ph.D.
[hidden email]