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

Syncing Develop into netcore #523

Draft
wants to merge 35 commits into
base: feature/netcore
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
816875a
Improved regression suite.
CBenghi Mar 14, 2022
0b9ca6d
OCC Fix: Removed infinite loop.
CBenghi Mar 15, 2022
e4b7be1
Essentials version update.
CBenghi May 4, 2022
2fd1c2e
removed duplicate 'PackageReference' items from Xbim.Geometry.Engine.…
hsbSantiago Sep 5, 2022
a2c02d2
Merge pull request #394 from santiagoIT/master
andyward Sep 26, 2022
c6bcfcd
Publish netcore alpah version to FlexGet
SteveLockley Dec 8, 2022
988bf5f
Upgraded to V6 label
SteveLockley Dec 9, 2022
8dd8da7
Revert "Upgraded to V6 label"
andyward Jan 1, 2023
c1c2281
build fix
andyward Jan 1, 2023
ba18069
Unique region names for many context w/geometries.
CBenghi Feb 23, 2023
146ca14
fixed up IfcCShapeProfileDef error when values of girth and tchicknes…
okaharu0795 Feb 27, 2023
f04258a
add an unit test to create XbimWire without errors even if girth and …
okaharu0795 Mar 7, 2023
c4df872
Merge pull request #417 from okaharu0795/issues/issue414
andyward Mar 7, 2023
8c52b64
Added test on trimmed curve creation
Sep 18, 2023
9c75105
Fixed XbimCurve geometry construction for trimmed ellipse
Sep 18, 2023
58da50c
Merge pull request #449 from ChernyshevDS/fix/trimmed-ellipse-447
andyward Sep 18, 2023
79f48f6
s
Ibrahim5aad Nov 1, 2023
a1098f5
Added missing LogInfo argument
Jul 30, 2024
b7cab59
Merge pull request #493 from santiagoIT/Issue-492
andyward Jul 30, 2024
62e0bba
Merge remote-tracking branch 'origin/develop' into develop
Sep 6, 2024
7ab6829
Upgrade Essentials
Sep 9, 2024
be94105
Fixed issue in configuring xbim services
Sep 9, 2024
a46db13
Merge pull request #499 from xBimTeam/upgrade-packages
Ibrahim5aad Sep 9, 2024
4c31ad9
add tests
Nov 19, 2024
17d2873
add more tests
Nov 19, 2024
a4518c1
fix crash
Nov 19, 2024
3c1882e
remove my tests
Nov 19, 2024
33beaad
Fix for memory access violation when filling loop #512 (#517)
andyward Dec 14, 2024
8f41876
Workaround for Invalid AdvancedBrep reporting infinite bounding box (…
andyward Dec 14, 2024
41dbb27
chore: Update Newtonsoft to fix warning
andyward Dec 15, 2024
e78de1c
Synchronised with master
andyward Dec 15, 2024
d95dc8b
Pre-release tidying. Update Changelog
andyward Dec 15, 2024
2f6e3a6
Fix/Skip failing tests
andyward Dec 15, 2024
9c639b4
Updated to latest released Essential dependencies
andyward Dec 17, 2024
18278cb
Merge pull request #505 from r-silveira/develop-face-crash
Ibrahim5aad Jan 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,39 @@

All notable changes to this project should be documented in this file

## [v5.1.785] 2024-12-15

Final 5.1 release before v6 (supporting netcore and IFC4.3)

### Changed
- Updated to OpenCascade 7.5.2
- Switched to v6 Essentials Dependency Injection & Logging
### Added
- Baseline support for IFC4.3 schema (not including new geometries and linear placement)
- BatchProcessor can now mesh single Breps
### Removed
### Fixed
- Better logging on unmanaged exceptions
- Fix for #281: Stackoverflow when precision is incorrect on Wires
- Fixed management of invalid normals
- Fix for collinear points in profiles
- Added null check when trimming faces
- Fix #388 : SurfaceCurveSweptAreaSolid regression
- Fix: Small scale errors would throw exception
- Fix managed objects lifetime (@daniilch)
- Fix: Handle OCC precision issue in BRepTools_WireExplorer (@FrozenKiwi)
- Fix #370: Premature garbage collection of objects holding native resources (@ChernyshevDS)
- Fix infinite loop in ShapeUpgrade_UnifySameDomain
- Security fix: Update Newtonsoft
- Added workaround for ArchiCAD precision issues
- Unique region names for many context w/geometries
- #492 Fix logging when warning about incorrect composite profile
- fixed up IfcCShapeProfileDef error when values of girth and thickness are the same (@okaharu0795)
- Fix #447 Incorrect curve parameters when creating XbimCurve for trimmed ellipse (@ChernyshevDS)
- #512 Fix Memory Access Violation issues (v4 regresion due to use of No_Exceptions)
- Fixes major disparity between Debug and Release builds as OCC was not raising Standard_Failure exceptions in Release build: often triggering unmanagaed 'access violation' exceptions
- #512 Handle invalid AdvancedBreps better when calculating regions

## [v5.1.239] 2019-06-03

Candidate release for 5.1
Expand Down
155 changes: 131 additions & 24 deletions Xbim.Geometry.Engine.Interop.Tests/GithubIssuesTests.cs
Original file line number Diff line number Diff line change
@@ -1,32 +1,139 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using FluentAssertions;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xbim.Common.Configuration;
using Xbim.Common.Geometry;
using Xbim.Ifc4.Interfaces;
using Xbim.IO.Memory;
using Xbim.ModelGeometry.Scene;

namespace Xbim.Geometry.Engine.Interop.Tests
{
[TestClass]
public class GithubIssuesTests
{
[TestMethod]
public void Github_Issue_281()
{
// this file resulted in a stack-overflow exception due to precision issues in the data.
// We have added better exception management so that the stack-overflow is not thrown any more,
// however the voids in the wall are still not computed correctly.
//
using (var m = new MemoryModel(new Ifc2x3.EntityFactoryIfc2x3()))
{
m.LoadStep21("TestFiles\\Github\\Github_issue_281_minimal.ifc");
var c = new Xbim3DModelContext(m);
c.CreateContext(null, false);

// todo: 2021: add checks so that the expected openings are correctly computed.
}
}
}
[TestClass]
public class GithubIssuesTests
{
[TestMethod]
public void Github_Issue_281()
{
// this file resulted in a stack-overflow exception due to precision issues in the data.
// We have added better exception management so that the stack-overflow is not thrown any more,
// however the voids in the wall are still not computed correctly.
//
using (var m = new MemoryModel(new Ifc2x3.EntityFactoryIfc2x3()))
{
m.LoadStep21("TestFiles\\Github\\Github_issue_281_minimal.ifc");
var c = new Xbim3DModelContext(m);
c.CreateContext(null, false);

// todo: 2021: add checks so that the expected openings are correctly computed.
}
}

[TestMethod]
public void Github_Issue_447()
{
// This file contains a trimmed curve based on ellipse which has semiaxis1 < semiaxis2
// and trimmed curve is parameterized with cartesian points.
// This test checks for a bug in XBimCurve geometry creation procedure when incorrect parameter values
// are calculated for these specific conditions described above.
using (var model = MemoryModel.OpenRead(@"TestFiles\Github\Github_issue_447.ifc"))
{
var shape = model.Instances.OfType<IIfcTrimmedCurve>().FirstOrDefault();
Assert.IsNotNull(shape);
var trimPoint1 = shape.Trim1.OfType<IIfcCartesianPoint>().FirstOrDefault();
Assert.IsNotNull(trimPoint1);
var trimPoint2 = shape.Trim2.OfType<IIfcCartesianPoint>().FirstOrDefault();
Assert.IsNotNull(trimPoint2);

var trimStart = new XbimPoint3D(trimPoint1.X, trimPoint1.Y, trimPoint1.Z);
var trimEnd = new XbimPoint3D(trimPoint2.X, trimPoint2.Y, trimPoint2.Z);

IXbimGeometryEngine geomEngine = new XbimGeometryEngine();
var geom = geomEngine.CreateCurve(shape);
Assert.IsNotNull(geom);

Assert.AreEqual(trimStart, geom.Start);
Assert.AreEqual(trimEnd, geom.End);
}
}

[TestMethod]
public void Github_Issue_512()
{
//var loggerFactory = new LoggerFactory().AddConsole(LogLevel.Trace);
//XbimServices.Current.ConfigureServices(s => s.AddXbimToolkit(b => b.AddLoggerFactory(loggerFactory)));
var ifcFile = @"TestFiles\Github\Github_issue_512.ifc";
// Triggers OCC Memory violation
using (var m = MemoryModel.OpenRead(ifcFile))
{
var c = new Xbim3DModelContext(m);
var result = c.CreateContext(null, true);

Assert.IsTrue(result, "Expect success");

Assert.IsFalse(m.GeometryStore.IsEmpty, "Store expected to be full");
}
}

[TestMethod]
public void Github_Issue_512b()
{
//var loggerFactory = new LoggerFactory().AddConsole(LogLevel.Trace);
//Common.Configuration.XbimServices.Current.ConfigureServices(s => s.AddXbimToolkit(b => b.AddLoggerFactory(loggerFactory)));
var ifcFile = @"TestFiles\Github\Github_issue_512b.ifc";
// Triggers OCC Memory violation
using (var m = MemoryModel.OpenRead(ifcFile))
{
var c = new Xbim3DModelContext(m);
var result = c.CreateContext(null, true);

Assert.IsTrue(result, "Expect success");

Assert.IsFalse(m.GeometryStore.IsEmpty, "Store expected to be full");

using (var reader = m.GeometryStore.BeginRead())
{
var regions = reader.ContextRegions.Where(cr => cr.MostPopulated() != null).Select(cr => cr.MostPopulated());

var region = regions.FirstOrDefault();

region.Size.Length.Should().BeApproximately(1.747, 0.001);
}
}
}

//[TestMethod]

//public void Github_Issue_512d()
//{

// var ifcFile = @"C:\Users\AndyWard\XBIM\Models - Documents\0400 Under NDA\TraceSoftware\CDO_EXE_240_ML04_S_1_01.extracted.ifc";
// // Triggers OCC Memory violation
// using (var m = MemoryModel.OpenRead(ifcFile))
// {
// var loggerFactory = new LoggerFactory().AddConsole(LogLevel.Trace);
// var geomEngine = new XbimGeometryEngine();
// var logger = loggerFactory.CreateLogger<GithubIssuesTests>();

// IIfcAdvancedBrep brep = m.Instances[9020] as IIfcAdvancedBrep;

// var geom = geomEngine.CreateSolidSet(brep, logger);

// geom.IsValid.Should().BeTrue();

// foreach(var shape in geom)
// {
// var bb = shape.BoundingBox;
// Console.WriteLine($"{shape.IsValid} {shape.IsPolyhedron} {shape.BoundingBox.Length()} {shape.BoundingBox} ");
// }
// // geom.SaveAsBrep("Foo.brep");

// geom.BoundingBox.Length().Should().BeLessOrEqualTo(1e10);
// }

//}
}
}
Loading