bSI-InfraRoom / IFC-Specification

IfcDoc baseline to produce the documentation
24 stars 25 forks source link

IfcClothoid and IfcAlignmentHorizontalSegment are inconsistent in defining a clothoid spiral #97

Closed RickBrice closed 3 years ago

RickBrice commented 3 years ago

The IfcClothoid used in the Alignment Geometric Gradient concept seems to be incompletely defined when compared to the IfcAlignmentHorizontalSegment with PredefinedType=CLOTHOID in the Alignment Decomposition concept.

Consider the case of a clothoid transition curve between two circular arcs of different radii, R1 and R2. The semantic definition for the decomposition concept would be:

IfcAlignmentHorizontalSegment.PredefinedType=CLOTHOID, IfcAlignmentHorizontalSegment.StartRadiusOfCurvature=R1, and IfcAlignmentHorizontalSegment.EndRadiusOfCurvature=R2.

The geometric definition would be: IfcClothoid.ClothoidConstant=A

The geometric definition defines an infinitely long spiral.

Why does the spiral need to be defined twice (once with RelNests and once with Representation)? I know I've asked this before, but I still don't get it. Some concrete examples my be helpful.

Why is the spiral defined differently in the different concepts?

SergejMuhic commented 3 years ago

It does not have to be defined twice but in order to use sweeps and in order to position along a curve, a curve definition is required. A curve definition by definition is a point extruded along a path. The path has to be parameterized. To avoid various bounded curve types with countless different parameterizations, the spiral curve was introduced. The special types Polynomial spirals address the requirements of all polynomial based spirals. These can be used for clothoids also, but the IfcClothoid was adopted from STEP part 42 for convenience sake and to maintain the strong bond to STEP geometry definitions.

About the geometric definition, you are missing the key point which is the IfcCurveSegment which supplies the necessary context to make a segment from a curve which is inherently infinite.

pjanck commented 3 years ago

@RickBrice Please DM me and I'll share a recording or two from the Infra DEPL project with you, where this is explained in more depth by @SergejMuhic .

One other thing that may help you get going while I get the recordings together, is the IFC philosophy, that every product optionally has its representation and location. You may have a wall (product) with extruded or BRep geometry (representation). Similarly, you may have alignment segments (product) with polyline, straight lines or trimmed spirals (representation). (These are only examples, there may be other combinations as well.)

RickBrice commented 3 years ago

@SergejMuhic I see what you are saying about IfcCurveSegment. For a clothoid that transitions between circles for radii R1 and R2 with R1 > R2, IfcClothoid.SegmentStart would be the distance along the clothoid from the point of infinite radius to the point where radius = R1. IfcClothoid.SegmentLength would be the length where the radius is equal to R1 to the point where the radius is equal to R2.

How would it be defined if R2 > R1? I think IfcClothoid.Placement defines this, but It's quite confusing to me. A picture would be helpful. The description of .Placement talks about RefDirection but IfcPlacement does not have a RefDirection attribute so I guess only a sub-set of the IfcPlacement derived types are applicable.

@pjanck I didn't see how to DM on GitHub.com so I looked up your TUM email and sent you a message. I hope that was ok. In all my reading of the spec, I didn't pick up on the IFC philosophy you mentioned. I never thought of an alignment segment as a product, just a piece of a linear referencing system. In the context of a highway that spans the length of an entire country, I see the logical in breaking it up into smaller segments (like segments related to state, county, city limits, etc), each one being a product. Is that loosely analogous to having multiple buildings on a site and organization information into its appropriate building space? Or maybe I'm way off?

If I may impose for another question, what parameter is being referred to with IfcParameterValuein IfcCurveMeasureSelect?

SergejMuhic commented 3 years ago

How would it be defined if R2 > R1? I think IfcClothoid.Placement defines this, but It's quite confusing to me. A picture would be helpful. The description of .Placement talks about RefDirection but IfcPlacement does not have a RefDirection attribute so I guess only a sub-set of the IfcPlacement derived types are applicable.

In this case the parameter SegmentLength shall be negative. IfcPlacement is abstract, only its subtypes can be instantiated.

Any IfcCurve is by definition "A curve can be envisioned as the path of a point moving in its coordinate space.". This means that at any point along the length of the curve you are supposed to be able to get the cartesian coordinates. To summarize, the coordinates are a function of a parameter that represents the length of the curve.

E.g. for line: http://www.nabla.hr/PC-ParametricEqu1.htm