# Alibre Design Parametric Offset

**URL:** <https://donetoolkit.discourse.group/t/alibre-design-parametric-offset/27>\
**Category:** Alibre\
**Created:** [April 26, 2026, 11:31pm UTC](https://donetoolkit.discourse.group/t/alibre-design-parametric-offset/27 "2026-04-26T23:31:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![GIOV](https://sea2.discourse-cdn.com/flex002/user_avatar/donetoolkit.discourse.group/giov/32/22_2.png) [@GIOV](https://donetoolkit.discourse.group/u/GIOV)\
**Post date:** [April 26, 2026, 11:31pm UTC](https://donetoolkit.discourse.group/t/alibre-design-parametric-offset/27/1 "2026-04-26T23:31:12Z")

</div>

Hi Stephen,

This Sketch tool for Part & 2D Drawing WorkSpaces will be essential for generating structural sections from a lines and curves (spline) . Currently, it is not parametric as show in the pic, which means that changes to the base curve are not reflected in the offset curve. This results in a significant loss of time during the design process.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/ssm_github/original/1X/263aff2163f623fb3864594cee0fed1f0a79c524.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/ssm_github/original/1X/b2a946d70259d7f2363f6396f702ec1af5796800.png)

---

<div class="post-metadata">

**Author:** ![ssm](https://sea2.discourse-cdn.com/flex002/user_avatar/donetoolkit.discourse.group/ssm/32/7_2.png) [@ssm](https://donetoolkit.discourse.group/u/ssm)\
**Post date:** [April 27, 2026, 1:27am UTC](https://donetoolkit.discourse.group/t/alibre-design-parametric-offset/27/2 "2026-04-27T01:27:02Z")

</div>

Made this topic public on April 27, 2026, 1:27am UTC



---

<div class="post-metadata">

**Author:** ![ssm](https://sea2.discourse-cdn.com/flex002/user_avatar/donetoolkit.discourse.group/ssm/32/7_2.png) [@ssm](https://donetoolkit.discourse.group/u/ssm)\
**Post date:** [May 3, 2026, 4:16am UTC](https://donetoolkit.discourse.group/t/alibre-design-parametric-offset/27/3 "2026-05-03T04:16:56Z")

</div>

@GIOV just curious if you have any more information on the FreeCAD boat + Alibre idea?

---

<div class="post-metadata">

**Author:** ![GIOV](https://sea2.discourse-cdn.com/flex002/user_avatar/donetoolkit.discourse.group/giov/32/22_2.png) [@GIOV](https://donetoolkit.discourse.group/u/GIOV)\
**Post date:** [May 4, 2026, 10:21pm UTC](https://donetoolkit.discourse.group/t/alibre-design-parametric-offset/27/4 "2026-05-04T22:21:39Z")

</div>

Hi Stephen,

I will give answer tomorrow. Now I am so busy.

---

<div class="post-metadata">

**Author:** ![GIOV](https://sea2.discourse-cdn.com/flex002/user_avatar/donetoolkit.discourse.group/giov/32/22_2.png) [@GIOV](https://donetoolkit.discourse.group/u/GIOV)\
**Post date:** [May 5, 2026, 11:35pm UTC](https://donetoolkit.discourse.group/t/alibre-design-parametric-offset/27/5 "2026-05-05T23:35:02Z")

</div>

Gemini Answer:

Translate the source code from the FreeCAD Ship Workbench into C++ so that it can be used as an add-on in Alibre Design Version 21

Translating the **FreeCAD Ship Workbench** into a C++ add-on for **Alibre Design** is a significant undertaking. The two programs use entirely different architectures, APIs, and programming languages for their extensions.

The FreeCAD Ship Workbench is primarily written in **Python** and relies on the **OpenCASCADE (OCCT)** kernel. Alibre Design is a Windows-native application built on the **ACIS** kernel, and its API is exposed via **COM (Component Object Model)**, typically accessed using C++ or C#.

Here is the strategic roadmap for this porting project.

* * *

### **1. Architecture Comparison**

Before writing code, you must account for the fundamental differences in how these systems handle data:

| **Feature** | **FreeCAD Ship Workbench** | **Alibre Design (v21)** |
| --- | --- | --- |
| **Primary Language** | Python | C++ / C# (.NET) |
| **Geometry Kernel** | OpenCASCADE (OCCT) | Spatial ACIS |
| **API Style** | Script-heavy / Modular | COM-based / Event-driven |
| **UI Framework** | Qt (PySide) | Windows Forms / WPF |

* * *

### **2. Core Translation Challenges**

#### **Geometry Kernel Mismatch**

The Ship Workbench uses OCCT functions for hydrostatic calculations and hull generation (like `Part.BRep` objects). Alibre uses ACIS.

- **The Problem:** You cannot simply copy-paste logic that involves topological naming or face filtering.

- **The Solution:** You will need to rewrite the geometry creation logic using the `IADPartSession` and `IADDesignSession` interfaces in the Alibre API.

#### **Hydrostatic Logic**

The Ship Workbench performs calculations for displacement, center of buoyancy, and transverse stability.

- **The Port:** Since these are mathematical/physical formulas, the logic translates well to C++. However, you must implement your own “slicing” algorithm (integrating cross-sectional areas) because you won’t have the specific FreeCAD `Ship` module helpers.

* * *

### **3. Step-by-Step Porting Guide**

#### **Phase A: Setting up the C++ Project**

1. Open Visual Studio and create a **C++ Windows Desktop Wizard** project (DLL).

2. Import the Alibre Design Type Library (`AlibreX.tlb`).

3. Implement the `IADAddOn` interface so Alibre recognizes your DLL as an active add-on.

#### **Phase B: Translating Python to C++**

You will need to manually map Python logic to C++ COM calls.

**FreeCAD (Python) Example:**

**Python**

```auto
# Creating a point
p = FreeCAD.Vector(0, 0, 0)

```

**Alibre (C++ COM) equivalent:**

**C++**

```auto
// Using smart pointers from the Alibre Type Library
IADDesignSessionPtr pSession = pTargetApp->ActiveSession;
IADDesignContextPtr pContext = pSession->DesignContext;
// Geometry creation requires moving through the Alibre API hierarchy

```

#### **Phase C: UI Implementation**

FreeCAD uses `.ui` files (Qt). For Alibre v21, you should:

- Create a **Docking Pane** or a modal dialog using the Win32 API or MFC.

- Alternatively, wrap a C# UserControl into your C++ project to make UI design easier.

* * *

### **4. Critical Technical Considerations**

- **The Ship Outline:** In FreeCAD, ship hulls are often generated via “Lofts.” In Alibre C++, you will use `IADLoftFeature`.

- **Units:** FreeCAD is unit-agnostic internally (usually mm), while Alibre handles units strictly through its `IADDesignSession` settings. Ensure your C++ math accounts for this.

- **Performance:** One advantage of this move is speed. C++ will handle the iterative hydrostatic slicing significantly faster than the original Python implementation.

### **5. Recommended Tools**

- **OpenCASCADE:** Since the Ship Workbench logic is built for OCCT, you might consider linking the **OCCT C++ libraries** into your Alibre Add-on to handle the “heavy lifting” of the ship-specific math before passing the final coordinates to Alibre.

- **Alibre SDK Documentation:** Found in the `\API\` folder of your Alibre installation directory. Use the `AlibreX.chm` file as your primary reference.

This is a high-level architectural shift. I recommend starting with porting a single calculation (like **Displacement** ) before attempting to port the hull generation tools.

Ref:

> **[GitHub - FreeCAD/freecad.ship: A FreeCAD workbench aiding in naval vessel design](https://github.com/FreeCAD/freecad.ship)**
>
> A FreeCAD workbench aiding in naval vessel design

---

<div class="post-metadata">

**Author:** ![ssm](https://sea2.discourse-cdn.com/flex002/user_avatar/donetoolkit.discourse.group/ssm/32/7_2.png) [@ssm](https://donetoolkit.discourse.group/u/ssm)\
**Post date:** [May 27, 2026, 4:06pm UTC](https://donetoolkit.discourse.group/t/alibre-design-parametric-offset/27/7 "2026-05-27T16:06:25Z")

</div>

Same comment applies here:

> [@Hydrostatics & Stability for boats in Alibre](https://donetoolkit.discourse.group/t/hydrostatics-stability-for-boats-in-alibre/33/5):
>
> I am waiting for V29 release to continue any addon work. I realize you are not a v29 user, however my process is built for the latest Alibre Design versions. After the release I need a week or two for review.

---

<div class="post-metadata">

**Author:** ![ssm](https://sea2.discourse-cdn.com/flex002/user_avatar/donetoolkit.discourse.group/ssm/32/7_2.png) [@ssm](https://donetoolkit.discourse.group/u/ssm)\
**Post date:** [July 29, 2026, 10:42am UTC](https://donetoolkit.discourse.group/t/alibre-design-parametric-offset/27/8 "2026-07-29T10:42:34Z")

</div>

Archived on July 29, 2026, 10:42am UTC


