CAD 应用程序是用什么语言编写的?它们是如何组织的?

发布于 2024-07-17 23:29:02 字数 425 浏览 12 评论 0原文

当今的 CAD 应用程序(Rhino、Autocad)是用什么编写的以及它们内部是如何组织的?

我举了一个例子,Autocad 和 Rhino,尽管我也很想听听其他例子。 我特别想知道他们的后端是用什么语言编写的(多语言?),它是如何组织的,以及他们如何实时处理前端(GUI)? 他们使用本机 Windows API 还是他们自己的一些库,因为我想,尽管当今市场上的开源解决方案可能很好,但也无法解决这个问题。 我可能是错的......

正如大多数使用过它们的人知道的那样,它们实时处理相对复杂的旋转操作(我对阴影不感兴趣)。 我最近一直在用几个包做一些实验,对于一些较大的模型,发现其中一些模型(我不会命名)之间的速度存在相当大的差异,例如编程旋转(大型全船模型) 。 所以我想知道他们的内部结构......

另外,如果有人知道关于这个主题的一些书,我很想听听。

What are CAD applications (Rhino, Autocad) of today written in and how are they organized internally ?

I gave as an example, Autocad and Rhino, although I would love to hear of other examples as well. I'm particularly interested in knowing what is their backend written in (multilanguage ?) and how is it organized, and how do they handle their frontend (GUI) in real time ? Do they use native windows API's or some libraries of their own, since I imagine, as good as may be, the open source solutions on today's market won't cut it. I may be wrong ...

As most of you who have used them know, they handle amongs other things relatively complex rotational operations in realtime (shading is not interesting me). I've been doing some experiments with several packages recently, and for some larger models found that there is considerable difference in speed in, for example, programed rotation (big full ship models) amongst some of them (which I won't name). So I'm wondering about their internals ...

Also, if someone knows of some book on the subject, I'd be interested to hear of it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

回眸一笑 2024-07-24 23:29:02

CATIAv5、Pro/Engineer 和 Solidworks 等 3D 机械 CAD 软件大多是用 C++ 编写的,有时还带有一个瘦 COM 接口,用于向客户发布基本 API。

由于这些应用程序非常庞大并且由多个团队开发,因此它们依赖于大规模 C++ 设计原则,例如接口/实现模式来使模块免受更改。

它们由多个子系统组成,例如:

  • 一个提供底层操作系统抽象的基本框架
  • 用于 GUI、对话框和用户交互的框架
  • 3D 渲染器(主要使用带有一些自定义场景图形层的 OpenGL)
  • 几何内核,带有曲面细分模块(以便几何图形可以在渲染器中显示)
  • 基于几何内核的参数化建模器
  • 和针对不同领域(机械、绘图、模拟等)的许多特定建模器

3D Mechanical CAD software such as CATIAv5, Pro/Engineer and Solidworks are mostly written in C++, sometimes with a thin COM interface for publishing basic API to customers.

Since these applications are really huge and are being developped by several teams, they rely on large scale C++ design principles, such as Interface/Implementation patterns to insulate the modules from changes.

They are composed of several subsystems such as:

  • a base framework to provide abstraction from the underlaying OS
  • a framework for GUI, dialogs and user interaction
  • a 3D renderer (mostly using OpenGL with some custom scene graph layer)
  • a geometric kernel, with a tessellation module (so that geometry can be displayed in the renderer)
  • a parametric modeler build upon the geometric kernel
  • and a lot specific modelers targeted at different domains (Mechanical, Drafting, Simulation, ...)
落叶缤纷 2024-07-24 23:29:02

由于我的公司是 AutoCAD 的注册开发人员,因此我确信它是用 C++ 编写的。 它公开了一个 COM 接口以及一个 .Net 包装器。 此外,它的图形显示是组件化的并且可以被替换。
追溯到它的历史,它曾经是跨平台的。 然而,Windows 只出现了大约 10 年,现在它利用了我见过的所有 Windows 功能。
您可能对开放设计联盟感兴趣。

As my company is a registered developer for AutoCAD, I know for certain that its written in C++. It exposes a COM interface, as well as a .Net wrapper. Also, it graphics display is componentized and could be possibly replaced.
Way back in its history it used be cross-platform. However its been Windows only for about 10 years and now takes advantage every Windows feature I've seen.
You may be interested in the Open Design Alliance.

浊酒尽余欢 2024-07-24 23:29:02

AutoLISP 是 Lisp 的一种风格,多年来一直用于 AutoCAD 编程。 非常强大,一点也不友好。
AutoCAD(以及大多数垂直行业)内置 VBA 已经有大约 10 年了。 有点强大,非常友好。 VBA 项目存储在一个单独的文件中,该文件由主机程序内部的机制加载。
最新版本(当前为 2010)默认不再包含 VBA。 您必须安装单独的 VBA 启用程序。 这让我们注意到,VBA(就此而言,VB6)将在某些时候成为过去。 .NET 平台是目前的首选。 常用的有VB.NET、C#.NET、C++。 有些人尝试了其他 .NET 语言,例如 F# 和 IronPython。

AutoLISP is a flavor of lisp that has been used for years to program AutoCAD. Very powerful, not at all friendly.
AutoCAD (and most verticals) have had VBA built-in for about 10 years. Kind of powerful, very friendly. VBA projects are stored in a separate file that is loaded by a mechanism internal to the host program.
The latest version (currently 2010) no longer includes VBA by default. You must install a separate VBA enabler. This is to put us on notice that VBA (VB6 for that matter) will at some point be a thing of the past. The .NET platform is currently the preferred choice. VB.NET, C#.NET, C++ are commonly used. Some have experimented with other .NET languages like F# and IronPython.

絕版丫頭 2024-07-24 23:29:02

您可能会对开源项目 BRL-CAD 感兴趣。

The open source project BRL-CAD might interest you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文