[Cuis-dev] Combining Smalltalk and Open Cascade

Phil B pbpublist at gmail.com
Wed Mar 23 11:05:12 PDT 2022


Hi Aik-Siong,

You have a couple of options:

1) Create a VM plugin.  You could create a plugin which would handle
communicating with the C++ library.  Cuis would then talk to the plugin.

2) FFI.  As this is a C++ library, you're not going to be able to talk to
it directly via FFI.  So you'd need to create/use a C library shim/wrapper
to deal with instantiation/destruction of the C++ objects as well as
communicating with them.  Once that is in place, you'd then use FFI on the
Cuis side to communicate with the C library.

In most cases, if the library were written in C, I'd suggest going with
option 2 as FFI is pretty straightforward.  However, since you need a C
library to act as a bridge to the C++ library, both approaches may end up
being comparable amounts of work (i.e. creating a C library vs creating a
plugin) so it comes down to your personal preference.

Thanks,
Phil

On Tue, Mar 22, 2022 at 1:10 PM Aik-Siong Koh via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

> Hi:
>
> Open Cascade is an open source Solid Modeling engine which is used in
> FreeCAD and PythonOCC.
> I would like to use Smalltalk to do like PythonOCC so that Smalltalk can
> control the Solid Modeling engine.
> What would be the steps needed for Cuis to control Open Cascade?
>
> Thanks,
> Aik-Siong Koh
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220323/aeef5d77/attachment.htm>


More information about the Cuis-dev mailing list