Skip to content
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

Repeated elements not visible #92

Closed
Tpullmann opened this issue Feb 11, 2018 · 6 comments
Closed

Repeated elements not visible #92

Tpullmann opened this issue Feb 11, 2018 · 6 comments
Assignees
Labels
bug Confirmed bug - system not working as intended
Milestone

Comments

@Tpullmann
Copy link

Hi,

I've got an ifc file which contains a group of elements. Other tools like Tekla BimSight show it "correctly" (at least like in the authoring software Archicad).
bimsight

In XBim (also in the explorer) we see only one element out of the group.
xbim explorer

Export_123_IFC_2018_1_5_18_17.zip

Is the IFC file corrupt or do we have a gap?

@martin1cerny
Copy link
Member

I checked and the file doesn't seem to be corrupted. I tried to open in DDS CAD viewer as well and that said there were unrecoverable errors and rendered something completely different to both of your images. So, there is something hapenning in the data. xBIM is often more rigorous than Solibri but it should always report problems in the viewer if there are any. Which is not the case here. I had a look in the file and this element is boolean clipping result which subtracts 4 faceted BReps from an extruded profile. This kind of definition seems to be overcomplicated and error prone.

@CBenghi is more familiar with the actual geometry processing. What do you think Claudio?

#90880=IFCBUILDINGELEMENTPROXY('0wwfH1Jef5aOAljJ1xgZR2',#12,'Decke-001',$,$,#90643,#90876,'3AEA9441-4E8A-4591-82AF-B5307BAA36C2',$);
#90643=IFCLOCALPLACEMENT(#115,#90642);
#90642=IFCAXIS2PLACEMENT3D(#90640,#90638,#90636);
#90640=IFCCARTESIANPOINT((38.41,0.7,3.4));
#90638=IFCDIRECTION((0.,0.,1.));
#90636=IFCDIRECTION((1.,0.,0.));
#90876=IFCPRODUCTDEFINITIONSHAPE($,$,(#90868,#90874));
#90868=IFCSHAPEREPRESENTATION(#142,'Body','CSG',(#90867));
#90867=IFCBOOLEANRESULT(.DIFFERENCE.,#90866,#90863);
#90866=IFCBOOLEANRESULT(.DIFFERENCE.,#90865,#90814);
#90865=IFCBOOLEANRESULT(.DIFFERENCE.,#90864,#90765);
#90864=IFCBOOLEANRESULT(.DIFFERENCE.,#90664,#90716);
#90664=IFCEXTRUDEDAREASOLID(#90654,#90661,#90662,0.1);
#90654=IFCARBITRARYCLOSEDPROFILEDEF(.AREA.,'',#90652);
#90652=IFCPOLYLINE((#90644,#90646,#90648,#90650,#90644));
#90644=IFCCARTESIANPOINT((0.,0.));
#90646=IFCCARTESIANPOINT((9.39,0.));
#90648=IFCCARTESIANPOINT((9.39,6.7));
#90650=IFCCARTESIANPOINT((0.,6.7));
...

@martin1cerny
Copy link
Member

martin1cerny commented Feb 12, 2018

Here is the minimal example.

@bekraft
Copy link
Contributor

bekraft commented Oct 18, 2018

I came accross the same problem for Ifc2x3 models. While taking a deep dive into the geometry package, I saw a weird XbimSolid code fragment, which accepts only the first outcome of a boolean op in XbimSolid::Init(IIfcBooleanResult^ solid) (XbimSolid.cpp):

TopoDS_Solid  shape = (XbimSolid^)(xbimSolidSet->First);
if (!shape.IsNull())
{
	pSolid = new TopoDS_Solid(); //make sure this is deleted if not used
	*pSolid = shape; //just take the first as that is what is intended by IIfc schema
}

Means, the method drops all other results. Since a boolean difference can yield multiple unconnected shells (solid in xbim terms), this method won't return the proper result. Am I correct?

@bekraft
Copy link
Contributor

bekraft commented Oct 22, 2018

@martin1cerny @CBenghi Deep dive taken: It's not only this small fragment. There are multiple issues concerning CSG trees. First, I think there's some misalignment between IFC's "solid" and Xbim's "solid". While a "solid" in terms of the IFC is something made of multiple geometrical objects, xbim uses it for "shells" (there's a select "IfcSolidOrShell", http://www.buildingsmart-tech.org/ifc/IFC4/final/html/schema/ifcgeometricconstraintresource/lexical/ifcsolidorshell.htm).
Indeed, a solidset of xbim maps to the "solid" of the IFC. It's a little more complicated …

Finally, I've refactored some code of the geometry factory aka IXbimGeometryEngine and the underlying OCC adaption (see develop...bekraft:bugfixes/92). I'll open another PR.

xbimgeometry-92

@andyward andyward added this to the v5.0.0 milestone Nov 9, 2018
@andyward andyward added the bug Confirmed bug - system not working as intended label Nov 9, 2018
SteveLockley added a commit that referenced this issue Nov 25, 2018
CSG solid conversion now support multiple solid results
@andyward
Copy link
Member

Confirmed fixed in v5 - througth to Explorer (develop)
image

@SteveLockley
Copy link
Member

This is now resolved in Version 5, currently in the develop branch, thanks to BEKraft for his help on this one

andyward pushed a commit that referenced this issue Mar 7, 2019
guenter1holzeder added a commit to OrcaIfc/XbimGeometry that referenced this issue Oct 29, 2019
* Test added for Radian Parameters over PI in value

* Updated MemoryModel package to handle radian conversion factors correctly Github xBimTeam#92 issue

* Fixing issue xBimTeam#145

using filtering of representation items instead of finding first only

* Some corrections for fix xBimTeam#145

Evaluation wasn't triggered because there was no consumer of stream

* Fix for imprecisely defined planar wires github issue xBimTeam#73
Fix for SurfaceBaseModels being defined as multiple solids

* Extruded area solids with compound profiles treated to return a solid set

* Fixing issue xBimTeam#158

Second operand has never been added to difference build chain.
Refactored IfcBooleanClippingResult to XbimSolidSet conversion.

* Experimental: Changed ProjectTarget to 8.1 which should support Win 7SP1 clients

* Added targetver to set WINVER as per
https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=vs-2017

This is to support Win 7SP1 runtimes.

* Update azure-pipelines.yml for Azure Pipelines

Removed tests

* removed target.h

* Updated Nuget dependencies

* Geometry engine unreferenced after tests completed

* Workaround for boolean precision removed xBimTeam#166

* Fix for excessively large solid extrusions xBimTeam#160

* Fix for Ifc4 Add2 IfcTriangulatedFaceSet not rendering  xBimTeam#167

* Fix for inaccurately defined IfcPolyloops that are not planar

* Faceted Face set re-implemented to support tolerances better

* Threading Model changed to avoid race conditions, boolean cut ops optimised for non-intersecting arguments

* Composite curve reimplemented to correctly handle polylines as edges

* IndexedPolyCurve implemented as curve

* Fix for orientation of trimmed composite curve segments that are reversed

* IfcSweptDiskSolidPolygonal fixed for closed directrix.
XbimWire trim fixed for incorrect parameterisation

* Composite Curve as wire added

* IfcSectionedSpine fixed incorrect orientation error

* Non-Intersecting cuts not returning the body shape resolved

* Erro in booleans caused by Solids created from two coincidental faces fixed

* Trimming of compound curve wire fix

* Support for IIfcPolygonalFaceSet commenced

* Support for 2D Polylines as curves added

* Closed Shell chnaged to allow faulty solids with zero volume

* Undone zero volume closed shells

* Support for IfcPolygonalFaceSet completed.
Very large facesetsare meshed rather than OCCed to prevent extremely slow performance

* Reinstate tests now stabilty issue fixed

* Closed Seep for swept disk solid fixed

* Removed last traces of the large file

* Adding axis tags to logging output for convenience

* Adding fix for zero grid bounding box in CreateGrid

assuming that the bounding box has a zero Z-extent. Does this hold?

* Fix for unsupported curve type issue xBimTeam#180

* SweptDiskSolid fixed to align sweep with directrix direction

* Interval Points for Wire fixed to include last point
Composite curve wires now allow partial curves where segments are badly specified, a warning is issued rather than a failure error

* Support for composite curves containing multi-edge segments added

* Continue IfcGrid construction on exception

* Fixing pipe maker tolerance issue

* Half Space solid reimplemented with OCC MakeHalfSpaceSolid
Polygonally bound half space amended to construct semi-infinite prism
Fuzzy value for booleans increased to 6*tolerance
Max faces to sew increased to 3000

* Grid creation fixed for errors on building lines with near precision thickness

* Polygonal bounded half space corrected for potential boolean hangs with large extrema.
Edge start and end points fixed to handle null vertices

* Empty profile definition handled, polygonally bounded half space extrusion limited to prevent booleans hanging, compositve curve creation handles incorrect reverse segment definition

* References update to Master Nuget dependencies
Warnings fixed

* No change

* Minor readme update for VS versions

* Added extra tests to help with failing CI test

* Updated to 5.1 RTM essentials

* Added changelog for 5.1

* Update build for 5.1

* Fixed changelog typo

* Added changelog for 5.1

* Update build for 5.1

* Fixed changelog typo

* Updated to 5.1 version data.
Removed FileVersion so stamped by build

* Updated to latest pre-release 5.1 dependencies

* Updated latest RTM dependencies
(with fileversions)

* Updated 5.1 dependencies (xBimTeam#187)

* Updated latest RTM dependencies
(with fileversions)

* Release 5.1 with 5.1 AssemblyVersion (xBimTeam#188)

* Added changelog for 5.1

* Update build for 5.1

* Fixed changelog typo

* Updated to 5.1 version data.
Removed FileVersion so stamped by build

* Updated to latest pre-release 5.1 dependencies

* Updated latest RTM dependencies
(with fileversions)

* Confirmed release number

* Regression causing incorrect clipping of HalfSpaceSolids fixed

* Partial fix for incorrectly parameterised Polyline trims, further work is required to correctly implement Composite and Polyline curve trims when the BIM authros start to correctly write out the parameter values

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Extended CI build timeout from default (60 minutes) to 120 minutes

* Trying to fix pipeline with explicit definition of the job name

* Trying to fix pipeline with extended timeout

* Trying to fix the pipeline

* Creation of solid sets from IfcPolygonalFaceSet added

* Create Method for IfcPolygonalFaceSet amended to respect closed shells

* Updated Essentials to Release

* Attempt to fix large coordinates by reducing them and only keeping the transformation.

* Updated Tessellator

* Updated tessellator fixes shape bounding box position. Fixed transformation of the product bbox for region computation.

* Updated Essentials

* Added explicit test runsettings to help with failing tests

* Update azure-pipelines.yml for Azure Pipelines

Add runsettings

* Refactored tests to use paths relative to deployed items.

* Only deploy the native DLL for the current platform

Means that consumers only get the native DLL appropriate to their current platform build (x86/x64)
Fixes xBimTeam#216

* Better management of trims for IIfcSweptDiskSolid

Typically used for rebars.

* Tests was expecting wrong number of faces.

* Resumed caching to help see files in Xplorer.

When /caching is issued as parameter, the files are persisted as in xbim
format so they can be seen in xplorer to check the results of meshing.

* Tolerant of missing Z coordinate for some 3D pts.

* More cases of Z missing tolerance.

by code analysis, given a bug with unusual IFC files.

* Cutting wires of IIfcCompositeCurve only if needed

* Closed profile definitions with no outer profile caught and ignored

* Fix for OCC infinite loop in ShapeHealing
Time out added to ShapeHealing and Boolean Performs

* All shape healing functions protected with a timeout

* Fixed local tests runs

Wasn't running tests in VS test runner due to "An exception occurred while invoking executor 'executor://mstestadapter/v2': Could not load file or assembly 'System.IO,"

Since we introduced DeploymentItem, we were impacted by microsoft/testfx#295

* Copy both native files when building for AnyCPU

Broken fixing xBimTeam#216

* Added Test for Advanced Brep failure

* Added additional guard to be more tolerant when processing models without valid Contexts supplied.

Should address xBimTeam/XbimWindowsUI#94

* More graceful handling of representations without a ContextOfItems. These are in violation of the specs but we should support them better.

E.g. 2x3_Arboleda_Bldg-Arch.ifc

* Going for green.
Ignore an unimplemented test in this branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug - system not working as intended
Projects
None yet
Development

No branches or pull requests

5 participants