Skip to content

Conversation

@aothms
Copy link
Contributor

@aothms aothms commented Sep 18, 2025

This is a sketch of what procedural geometry as a supplementary set of properties in addition to the explicit geometry could look like.

afbeelding
  • 2D profile is fully contained in one atomic JSON blob no references. This is a step away from the express-inspired relational model in IFC4. This is on purpose. Less references, simpler updates.
  • Didn't get to the actual extrusion yet though, only profile, would be interesting if there could be some 'relative references' so that you can define extrusion depth at the occurence level and point to the profile which is inherited (maybe too complex).
  • Added Union and Ref to the schema. Very ugly. Did not want to spend time on this, given the overall desire to move to jsonschema. It's functional, but there are some hacks around unclarity between tagged/untagged unions.
  • The geometric schema is less inheritance-based (IFC4: IfcCurve > IfcBoundedCurve), more based on Unions. I think this can eliminate some unfortunate combinations, e.g IfcPolyline with discontinuities in IfcEdgeCurve or IfcTrimmedCurve of IfcPolyline which I think should not be allowed but stem from the singular hierarchy tree. And clears us of duplications such as IfcCircleProfileDef - IfcCircle. Specific unions allow for a much more purposeful limited and idiomatic set of constructs. I don't oppose inheritance though, e.g the Position attribute of Rectangle can be inherited from something more general.
  • I've previously argued that IfcCompositeCurve should no longer exist, but everything should be using general decomposition using Children. The can be inherited now in IFCx and could not in IFC4, which is I think the reason why various in-entity compositions where invented; to allow for their reuse. Sorry for not sticking to this. This has to be corrected before merging.
  • (The SVG rendering is for validating the data, there is no expectation that actual tools should build similar UIs)
  • The added example toggles the visibility of the existing windows in hello-wall. That's not something I would expect in real-world data.

The following schema would need to be added to IFCx.dev (no pull request there yet given the experimental state).

    "bsi::ifc::geometry::procedural::composite_profile": {
      "value": {
        "dataType": "Object",
        "objectRestrictions": {
          "values": {
            "Profiles": {
              "dataType": "Array",
              "arrayRestrictions": {
                "value": {
                  "ref": "bsi::ifc::geometry::procedural::profile"
                }
              }
            }
          }
        }
      }
    },
    "bsi::ifc::geometry::procedural::circular_arc": {
      "value": {
        "dataType": "Object",
        "objectRestrictions": {
          "values": {
            "Points": {
              "dataType": "Array",
              "arrayRestrictions": {
                "value": {
                  "dataType": "Array",
                  "arrayRestrictions": {
                    "value": {
                      "dataType": "Real"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "bsi::ifc::geometry::procedural::composite_curve": {
      "value": {
        "dataType": "Object",
        "objectRestrictions": {
          "values": {
            "Segments": {
              "dataType": "Array",
              "arrayRestrictions": {
                "value": {
                  "dataType": "Union",
                  "unionRestrictions": {
                    "values": [
                      {
                        "ref": "bsi::ifc::geometry::procedural::circular_arc"
                      },
                      {
                        "ref": "bsi::ifc::geometry::procedural::polyline"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "bsi::ifc::geometry::procedural::polyline": {
      "value": {
        "dataType": "Object",
        "objectRestrictions": {
          "values": {
            "Points": {
              "dataType": "Array",
              "arrayRestrictions": {
                "value": {
                  "dataType": "Array",
                  "arrayRestrictions": {
                    "value": {
                      "dataType": "Real"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "bsi::ifc::geometry::procedural::profile_with_voids": {
      "value": {
        "dataType": "Object",
        "objectRestrictions": {
          "values": {
            "exterior": {
              "ref": "bsi::ifc::geometry::procedural::profile"
            },
            "Interior": {
              "dataType": "Array",
              "arrayRestrictions": {
                "value": {
                  "ref": "bsi::ifc::geometry::procedural::profile"
                }
              }
            }
          }
        }
      }
    },
    "bsi::ifc::geometry::procedural::rectangle": {
      "value": {
        "dataType": "Object",
        "objectRestrictions": {
          "values": {
            "position": {
              "dataType": "Object",
              "objectRestrictions": {
                "values": {
                  "Location": {
                    "dataType": "Array",
                    "arrayRestrictions": {
                      "value": {
                        "dataType": "Real"
                      }
                    }
                  }
                }
              }
            },
            "Width": {
              "dataType": "Real"
            },
            "Height": {
              "dataType": "Real"
            }
          }
        }
      }
    },
    "bsi::ifc::geometry::procedural::profile": {
      "value": {
        "dataType": "Union",
        "unionRestrictions": {
          "values": [
            {
              "ref": "bsi::ifc::geometry::procedural::composite_profile"
            },
            {
              "ref": "bsi::ifc::geometry::procedural::profile_with_voids"
            },
            {
              "ref": "bsi::ifc::geometry::procedural::rectangle"
            },
            {
              "ref": "bsi::ifc::geometry::procedural::composite_curve"
            },
            {
              "ref": "bsi::ifc::geometry::procedural::polyline"
            }
          ]
        }
      }
    },
    "bsi::ifc::procedural_geometry": {
      "value": {
        "dataType": "Object",
        "objectRestrictions": {
          "values": {
            "has_profile": {
              "ref": "bsi::ifc::geometry::procedural::profile"
            }
          }
        }
      }
    }

@aothms aothms marked this pull request as draft September 18, 2025 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants