Skip to content
Back to skills

Mergeobject

ASecurity

Sub-skill of orcaflex-model-generator: _merge_object() (+2).

  • 17 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
toolspythongo

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add vamseeachanta/workspace-hub --skill mergeobject --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mergeobject?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Mergeobject
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vamseeachanta-mergeobject/badge)](https://www.skillsdirectory.com/skills/vamseeachanta-mergeobject)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: orcaflex-model-generator-mergeobject
description: 'Sub-skill of orcaflex-model-generator: _merge_object() (+2).'
version: 2.0.0
category: engineering
type: reference
scripts_exempt: true
---

# _merge_object() (+2)

## _merge_object()


Combines typed Pydantic fields with pass-through properties:

```python
@staticmethod
def _merge_object(obj: GenericObject) -> dict[str, Any]:
    merged = dict(obj.properties)           # 1. Start from properties bag
    explicitly_set = obj.model_fields_set    # 2. Track what was explicitly set

    for py_field, ofx_key in TYPED_FIELD_MAP.items():
        value = getattr(obj, py_field, None)
        if value is not None:
            merged[ofx_key] = value          # 3. Non-None typed fields override
        elif py_field in explicitly_set:
            merged[ofx_key] = value          # 4. Explicitly-set None preserved

    # 5. Priority keys first (Name, Category, ShapeType, etc.)
    ordered = {}
    for key in _PRIORITY_KEYS:
        if key in merged:
            ordered[key] = merged.pop(key)
    ordered.update(merged)
    return ordered
```


## Section Ordering (_SECTION_ORDER)


Critical: OrcaFlex validates references sequentially. Sections must appear in dependency order:

```
General → VariableData → ExpansionTables
→ RayleighDampingCoefficients, FrictionCoefficients, LineContactData
→ LineTypes, VesselTypes, ClumpTypes, StiffenerTypes, SupportTypes
→ Vessels, Lines, Shapes, 6DBuoys, 3DBuoys, Constraints, Links, Winches
→ MultibodyGroups, BrowserGroups, Groups
```


## Priority Keys (_PRIORITY_KEYS)


Mode-setting properties must appear before dependent properties within each object:

```python
_PRIORITY_KEYS = [
    "Name", "Category", "ShapeType", "Shape", "BuoyType",
    "Connection", "LinkType", "Geometry", "WaveType",
    "DegreesOfFreedomInStatics",
]
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.