-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trimming of IfcFaceSurface and IfcAdvancedFace #532
Comments
Trimming of IfcFaceSurface, respectively IfcAdvancedFaceAbout IfcFaceSurface and IfcAdvancedFaceAccording to buildingSmart [1], the The geometry of the Following, a few examples to this explanation: In each of the four examples, there is the original surface (gray) at the left, and the trimmed surface at the right. The boundary loop (red polyline) and its orientation (orange arrow) are displayed in the original surfaces. Example (a) shows a plane which should has an infinite extend. Example (b) shows a B-Spline-Surface with a finite extend, the geometry has a ring which is above the edge and a down peak below the edge. Example (c) is a cylinder with infinite length; the boundary loop goes in one circle around the cylinder, makes a straight connection along the side surface, goes in another circle around, and finally connects via the straight line to the first circle - similar to figure 438 in the documentation of the The Trimming with Constructive Solid Geometry (CSG)The current attempt of trimming the surface by the boundary loop was to use a variation of the intersection operation from CSG. To use this feature, the trimming object has to be a solid geometry, like the cube in the screenshot. However as shown in the description and the examples above, in the current problem the trimming object is just a closed polyline. The first idea would be the extrusion of the boundary loop along the normal vector of its interior area. This would work in case of the plane surface, like in example a. On the other side, this would not work for example d, because some surface mesh would be outside the vertical cylinder. Additionally, the determination of the normal vector is quite difficult in example c. Gap due to DiscretisationIn case of curved surfaces, a discretisation into planar faces, respectively triangles, is necessary to get a visualizable mesh for the GPU. Considering a two-dimensional sectional view through the 3D-mesh, the ideal curved surface would be some kind of smooth curve like an arc, and the discretised surface would be a polyline with straight lines where the points lie on the curve. Thus, segments occur between the ideal curve and the straight discretisation lines. Furthermore, it's expected that the points of the boundary loop will lie precise on the ideal curve; as well, segments between the straight polylines and the ideal curve will occur. In general case, there is no guarantee that the surface points and loop points are coincident, hence somewhere in the segments a distance (or gap) will be between the discretised surface geometry and the loop points. This distance can be an issue in the use of CSG. Alternative AlgorithmUntil now, a web search hasn't led to a solution which fits the described problem. Beside CSG, search keywords like "clip surface", "cut mesh by polyline", or "slice polygon" bring up quit good results. However, most of them cut with a plane in 3D, or with some kind of projection into a 2D plane, which do not fit for this problem in general case. Following, a few rough thoughts about how an alternative algorithm could look like:
This proposed algorithm is self developed based on a topological consideration of the problem. References[1] https://standards.buildingsmart.org/IFC/RELEASE/IFC4_1/FINAL/HTML/link/ifcfacesurface.htm |
With pull request #462, the entities
IfcFaceSurface
andIfcAdvancedFace
are supported - at least two special cases which are used in the official ifc example files. These two cases are anIfcPlane
as surface geometry, and anIfcBSplineSurfaceWithKnots
as surface geometry where the entire B-Spline surface must be used.For a general support of all cases, the surface geometry has to be trimmed with a closed polyline, which is provided by an
IfcFaceBound
entity. A corresponding ToDo is left in the functionOpenInfraPlatform::Core::IfcGeometryConverter::FaceConverterT::computeIfcFaceSurface(...)
Tthis problem is described in more detail in the next comment. Furthermore, a rough idea of a possible algorithm will be presented there.
The text was updated successfully, but these errors were encountered: