Skip to content

Commit

Permalink
Merged with Development
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLockley committed Dec 15, 2020
1 parent 1ec19ba commit 02ce514
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
</PropertyGroup>

<ItemGroup>
<None Include="..\Xbim.Geometry.Engine.Interop\bin\$(Configuration)\net47\Xbim.Geometry.Engine32.dll" Link="Xbim.Geometry.Engine32.dll">
<None Include="..\Xbim.Geometry.Engine.Interop\bin\$(Configuration)\net472\Xbim.Geometry.Engine32.dll" Link="Xbim.Geometry.Engine32.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\Xbim.Geometry.Engine.Interop\bin\$(Configuration)\net47\Xbim.Geometry.Engine64.dll" Link="Xbim.Geometry.Engine64.dll">
<None Include="..\Xbim.Geometry.Engine.Interop\bin\$(Configuration)\net472\Xbim.Geometry.Engine64.dll" Link="Xbim.Geometry.Engine64.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
Expand Down
31 changes: 13 additions & 18 deletions Xbim.Geometry.Engine.Interop/Xbim.Geometry.Engine.Interop.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Description>Provides support for the Ifc4 and Ifc2x3 Geometry conversion.</Description>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageId>Xbim.Geometry.Engine.Interop</PackageId>
<PackageIcon>logo.png</PackageIcon>
<PackageIcon>xbim-toolkit-icon.png</PackageIcon>
</PropertyGroup>

<ItemGroup>
Expand All @@ -26,8 +26,8 @@
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.1.1" />
<PackageReference Include="System.Threading.Tasks" Version="4.3.0" />
<PackageReference Include="Xbim.Ifc" Version="5.1.322-develop" />
<PackageReference Include="Xbim.Tessellator" Version="5.1.322-develop" />
<PackageReference Include="Xbim.Ifc" Version="5.1.323" />
<PackageReference Include="Xbim.Tessellator" Version="5.1.323" />
</ItemGroup>

<ItemGroup>
Expand All @@ -44,35 +44,35 @@
</ItemGroup>

<!--We need to execute this after a build to ensure the nuget packages are in the correct place for the c++ binding-->
<Target Name="BuildNativeCodeEngine" AfterTargets="Build">
<Target Name="BuildNativeCodeEngine" BeforeTargets="Build">
<Message Text="Building Xbim.Geometry.Engine x32 and x64 Native Dlls" Importance="High" />
<MSBuild Projects="@(NativeGeometryEngine)" Properties="Configuration=$(Configuration) ; OutDir=..\Xbim.Geometry.Engine.Interop\bin\$(Configuration)\net47\" Targets="Build">
<MSBuild Projects="@(NativeGeometryEngine)" Properties="Configuration=$(Configuration) ; OutDir=..\Xbim.Geometry.Engine.Interop\bin\$(Configuration)\net472\" Targets="Build">
<Output TaskParameter="TargetOutputs" ItemName="AssembliesBuiltByChildProjects" />
</MSBuild>
</Target>

<Target Name=" CleanNativeCodeEngine" BeforeTargets="Clean">
<Message Text="Cleaning Xbim.Geometry.Engine x32 Native Dlls" Importance="High" />
<MSBuild Projects="$(MSBuildProjectDirectory)\..\Xbim.Geometry.Engine\Xbim.Geometry.Engine.vcxproj" Properties="Configuration=$(Configuration);Platform=Win32;OutDir=..\Xbim.Geometry.Engine.Interop\bin\$(Configuration)\net47\" Targets="Clean">
<MSBuild Projects="$(MSBuildProjectDirectory)\..\Xbim.Geometry.Engine\Xbim.Geometry.Engine.vcxproj" Properties="Configuration=$(Configuration);Platform=Win32;OutDir=..\Xbim.Geometry.Engine.Interop\bin\$(Configuration)\net472\" Targets="Clean">
</MSBuild>
<Message Text="Cleaning Xbim.Geometry.Engine x64 Native Dlls" Importance="High" />
<MSBuild Projects="$(MSBuildProjectDirectory)\..\Xbim.Geometry.Engine\Xbim.Geometry.Engine.vcxproj" Properties="Configuration=$(Configuration);Platform=x64;OutDir=..\Xbim.Geometry.Engine.Interop\bin\$(Configuration)\net47\" Targets="Clean">
<MSBuild Projects="$(MSBuildProjectDirectory)\..\Xbim.Geometry.Engine\Xbim.Geometry.Engine.vcxproj" Properties="Configuration=$(Configuration);Platform=x64;OutDir=..\Xbim.Geometry.Engine.Interop\bin\$(Configuration)\net472\" Targets="Clean">
</MSBuild>
</Target>

<ItemGroup>
<Content Include="bin\$(Configuration)\net47\Xbim.Geometry.Engine32.dll">
<Content Include="bin\$(Configuration)\net472\Xbim.Geometry.Engine32.dll">
<Pack>true</Pack>
<PackagePath>build\net47;</PackagePath>
<PackagePath>build\net472;</PackagePath>
</Content>
<Content Include="bin\$(Configuration)\net47\Xbim.Geometry.Engine64.dll">
<Content Include="bin\$(Configuration)\net472\Xbim.Geometry.Engine64.dll">
<Pack>true</Pack>
<PackagePath>build\net47;</PackagePath>
<PackagePath>build\net472;</PackagePath>
</Content>
<Content Include="..\Xbim.Geometry.Engine.Interop.targets">
<Link>Xbim.Geometry.Interop.targets</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PackagePath>build\net47;</PackagePath>
<PackagePath>build\net472;</PackagePath>
<Pack>true</Pack>
</Content>
</ItemGroup>
Expand All @@ -81,12 +81,7 @@
<Folder Include="images\" />
</ItemGroup>

<ItemGroup>
<None Include="images\logo.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<None Include="..\xbim-toolkit-icon.png" Pack="True" PackagePath="\" />
</ItemGroup>
Expand Down
8 changes: 2 additions & 6 deletions Xbim.Geometry.Engine.Interop/XbimGeometryEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public XbimGeometryEngine() : this(null)
public XbimGeometryEngine(ILogger<XbimGeometryEngine> logger)
{

// Warn if runtime for Engine is not present, this is not necessary any more as we are net47
// Warn if runtime for Engine is not present, this is not necessary any more as we are net472
//XbimPrerequisitesValidator.Validate();


Expand Down Expand Up @@ -837,11 +837,7 @@ public IXbimGeometryObjectSet CreateSurfaceModel(IIfcPolygonalFaceSet shell, ILo
}
}

// TODO: Stubbed until we merge https://github.com/xBimTeam/XbimGeometry/commit/86bc1e83eeed0fd84b33bf64045cb6afeac3807b#diff-569f41af2079f5a015416a3c37bb6a5a1b81c5f97b33a341d506634abbfbe52b
public XbimShapeGeometry CreateShapeGeometry(double oneMillimetre, IXbimGeometryObject geometryObject, double precision, ILogger logger = null)
{
throw new NotImplementedException();
}

}

public static class LogHelper
Expand Down
6 changes: 1 addition & 5 deletions Xbim.Geometry.Engine/XbimGeometryCreator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1348,11 +1348,7 @@ namespace Xbim
return nullptr;
}

Xbim::Common::Geometry::XbimShapeGeometry^ XbimGeometryCreator::CreateShapeGeometry(double oneMillimetre, Xbim::Common::Geometry::IXbimGeometryObject^ geometryObject, double precision, Microsoft::Extensions::Logging::ILogger^ logger)
{
throw gcnew System::NotImplementedException();
// TODO: This is stubbed out until we merge the implementation from develop. temp fix for broken build
}


IXbimGeometryObject^ XbimGeometryCreator::Trim(XbimSetObject^ geometryObject)
{
Expand Down
71 changes: 35 additions & 36 deletions Xbim.Geometry.Engine/XbimGeometryCreator.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,30 @@ namespace Xbim

public ref class XbimGeometryCreator : IXbimGeometryEngine
{
static Assembly^ ResolveHandler(Object^ /*Sender*/, ResolveEventArgs^ /*args*/)

static Assembly^ ResolveHandler(Object^ /*Sender*/, ResolveEventArgs^ /*args*/)
{

// Warning: this should check the args for the assembly name!
return nullptr;
}
bool Is3D(IIfcCurve^ rep);

public:

static String^ SurfaceOfLinearExtrusion = "#SurfaceOfLinearExtrusion";
static String^ PolylineTrimLengthOneForEntireLine = "#PolylineTrimLengthOneForEntireLine";

private:
IXbimGeometryObject ^ Trim(XbimSetObject ^geometryObject);

IXbimGeometryObject^ Trim(XbimSetObject^ geometryObject);
static XbimGeometryCreator()
{
//AppDomain::CurrentDomain->AssemblyResolve += gcnew ResolveEventHandler(ResolveHandler);
/*Assembly::Load("Xbim.Ifc4");
Assembly::Load("Xbim.Common");
Assembly::Load("Xbim.Tessellator");*/

String^ timeOut = ConfigurationManager::AppSettings["BooleanTimeOut"];
if (!int::TryParse(timeOut, BooleanTimeOut))
BooleanTimeOut = 60;
Expand All @@ -63,18 +63,18 @@ namespace Xbim
AngularDeflectionInRadians = 0.5;// deflection of 28 degrees

String^ ignoreIfcSweptDiskSolidParamsString = ConfigurationManager::AppSettings["IgnoreIfcSweptDiskSolidParams"];
if(!bool::TryParse(ignoreIfcSweptDiskSolidParamsString,IgnoreIfcSweptDiskSolidParams))
if (!bool::TryParse(ignoreIfcSweptDiskSolidParamsString, IgnoreIfcSweptDiskSolidParams))
IgnoreIfcSweptDiskSolidParams = false;

}
protected:
~XbimGeometryCreator()
{
}

public:


//Central point for logging all errors
static void LogInfo(ILogger^ logger, Object^ entity, String^ format, ... array<Object^>^ arg);
static void LogWarning(ILogger^ logger, Object^ entity, String^ format, ... array<Object^>^ arg);
Expand All @@ -86,17 +86,17 @@ namespace Xbim
static double LinearDeflectionInMM;
static double AngularDeflectionInRadians;
static bool IgnoreIfcSweptDiskSolidParams;

virtual XbimShapeGeometry^ CreateShapeGeometry(IXbimGeometryObject^ geometryObject, double precision, double deflection, double angle, XbimGeometryType storageType, ILogger^ logger);

virtual XbimShapeGeometry^ CreateShapeGeometry(IXbimGeometryObject^ geometryObject, double precision, double deflection, ILogger^ logger/*, double angle = 0.5, XbimGeometryType storageType = XbimGeometryType::Polyhedron*/)
{
return CreateShapeGeometry(geometryObject, precision, deflection, 0.5, XbimGeometryType::PolyhedronBinary,logger);
return CreateShapeGeometry(geometryObject, precision, deflection, 0.5, XbimGeometryType::PolyhedronBinary, logger);
};

virtual XbimShapeGeometry^ CreateShapeGeometry(double oneMillimetre, IXbimGeometryObject^ geometryObject, double precision, ILogger^ logger)
{
double linearDeflection = oneMillimetre * LinearDeflectionInMM;
double linearDeflection = oneMillimetre * LinearDeflectionInMM;
return CreateShapeGeometry(geometryObject, precision, linearDeflection, AngularDeflectionInRadians, XbimGeometryType::PolyhedronBinary, logger);
};

Expand Down Expand Up @@ -131,16 +131,16 @@ namespace Xbim

//Create Wire
virtual IXbimWire^ CreateWire(IIfcCurve^ curve, ILogger^ logger);

virtual IXbimWire^ CreateWire(IIfcCompositeCurveSegment^ compCurveSeg, ILogger^ logger);
//Face creation
virtual IXbimFace^ CreateFace(IIfcProfileDef ^ profile, ILogger^ logger);
virtual IXbimFace^ CreateFace(IIfcCompositeCurve ^ cCurve, ILogger^ logger);
virtual IXbimFace^ CreateFace(IIfcPolyline ^ pline, ILogger^ logger);
virtual IXbimFace^ CreateFace(IIfcPolyLoop ^ loop, ILogger^ logger);
virtual IXbimFace^ CreateFace(IIfcSurface ^ surface, ILogger^ logger);
virtual IXbimFace^ CreateFace(IIfcPlane ^ plane, ILogger^ logger);
virtual IXbimFace^ CreateFace(IXbimWire ^ wire, ILogger^ logger);
virtual IXbimFace^ CreateFace(IIfcProfileDef^ profile, ILogger^ logger);
virtual IXbimFace^ CreateFace(IIfcCompositeCurve^ cCurve, ILogger^ logger);
virtual IXbimFace^ CreateFace(IIfcPolyline^ pline, ILogger^ logger);
virtual IXbimFace^ CreateFace(IIfcPolyLoop^ loop, ILogger^ logger);
virtual IXbimFace^ CreateFace(IIfcSurface^ surface, ILogger^ logger);
virtual IXbimFace^ CreateFace(IIfcPlane^ plane, ILogger^ logger);
virtual IXbimFace^ CreateFace(IXbimWire^ wire, ILogger^ logger);

//Shells creation
virtual IXbimShell^ CreateShell(IIfcOpenShell^ shell, ILogger^ logger);
Expand All @@ -164,7 +164,7 @@ namespace Xbim

virtual IXbimSolid^ CreateSolid(IIfcBooleanResult^ ifcSolid, ILogger^ logger);
virtual IXbimSolid^ CreateSolid(IIfcBooleanClippingResult^ ifcSolid, ILogger^ logger);

virtual IXbimSolid^ CreateSolid(IIfcHalfSpaceSolid^ ifcSolid, ILogger^ logger);
virtual IXbimSolid^ CreateSolid(IIfcPolygonalBoundedHalfSpace^ ifcSolid, ILogger^ logger);
virtual IXbimSolid^ CreateSolid(IIfcBoxedHalfSpace^ ifcSolid, ILogger^ logger);
Expand All @@ -188,7 +188,7 @@ namespace Xbim
virtual IXbimSolid^ CreateSolid(IIfcFaceBasedSurfaceModel^ ifcSurface, ILogger^ logger);

virtual IXbimSolid^ CreateSolid(IIfcCsgPrimitive3D^ ifcSolid, ILogger^ logger);

virtual IXbimSolid^ CreateSolid(IIfcSphere^ ifcSolid, ILogger^ logger);
virtual IXbimSolid^ CreateSolid(IIfcBlock^ ifcSolid, ILogger^ logger);
virtual IXbimSolid^ CreateSolid(IIfcRightCircularCylinder^ ifcSolid, ILogger^ logger);
Expand Down Expand Up @@ -233,26 +233,25 @@ namespace Xbim
virtual IXbimCurve^ CreateCurve(IIfcBSplineCurveWithKnots^ curve, ILogger^ logger);
virtual IXbimCurve^ CreateCurve(IIfcOffsetCurve3D^ curve, ILogger^ logger);
virtual IXbimCurve^ CreateCurve(IIfcOffsetCurve2D^ curve, ILogger^ logger);
virtual XbimMatrix3D ToMatrix3D(IIfcObjectPlacement ^ objPlacement, ILogger^ logger);
virtual XbimMatrix3D ToMatrix3D(IIfcObjectPlacement^ objPlacement, ILogger^ logger);
virtual IXbimSolidSet^ CreateGrid(IIfcGrid^ grid, ILogger^ logger);

// Inherited via IXbimGeometryEngine
virtual IXbimGeometryObject ^ Transformed(IXbimGeometryObject ^geometryObject, IIfcCartesianTransformationOperator ^transformation);
virtual IXbimGeometryObject ^ Moved(IXbimGeometryObject ^geometryObject, IIfcPlacement ^placement);
virtual IXbimGeometryObject ^ Moved(IXbimGeometryObject ^geometryObject, IIfcAxis2Placement3D ^placement)
virtual IXbimGeometryObject^ Transformed(IXbimGeometryObject^ geometryObject, IIfcCartesianTransformationOperator^ transformation);
virtual IXbimGeometryObject^ Moved(IXbimGeometryObject^ geometryObject, IIfcPlacement^ placement);
virtual IXbimGeometryObject^ Moved(IXbimGeometryObject^ geometryObject, IIfcAxis2Placement3D^ placement)
{
return Moved(geometryObject, (IIfcPlacement ^)placement);
return Moved(geometryObject, (IIfcPlacement^)placement);
};
virtual IXbimGeometryObject ^ Moved(IXbimGeometryObject ^geometryObject, IIfcAxis2Placement2D ^placement)
virtual IXbimGeometryObject^ Moved(IXbimGeometryObject^ geometryObject, IIfcAxis2Placement2D^ placement)
{
return Moved(geometryObject, (IIfcPlacement ^)placement);
return Moved(geometryObject, (IIfcPlacement^)placement);
};
virtual IXbimGeometryObject ^ Moved(IXbimGeometryObject ^geometryObject, IIfcObjectPlacement ^objectPlacement, ILogger^ logger);
virtual IXbimGeometryObject^ Moved(IXbimGeometryObject^ geometryObject, IIfcObjectPlacement^ objectPlacement, ILogger^ logger);
virtual IXbimGeometryObject^ FromBrep(String^ brepStr);
virtual String^ ToBrep(IXbimGeometryObject^ geometryObject);

};

virtual Xbim::Common::Geometry::XbimShapeGeometry^ CreateShapeGeometry(double oneMillimetre, Xbim::Common::Geometry::IXbimGeometryObject^ geometryObject, double precision, Microsoft::Extensions::Logging::ILogger^ logger);
};
}
};
}
8 changes: 4 additions & 4 deletions Xbim.Geometry.Regression/XbimRegression.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.1.1" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="NReco.Logging.File" Version="1.0.4" />
<PackageReference Include="Xbim.Ifc" Version="5.1.314" />
<PackageReference Include="Xbim.IO.Esent" Version="5.1.314" />
<PackageReference Include="Xbim.Ifc" Version="5.1.323" />
<PackageReference Include="Xbim.IO.Esent" Version="5.1.323" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Xbim.Geometry.Engine.Interop\Xbim.Geometry.Engine.Interop.csproj" />
<ProjectReference Include="..\Xbim.ModelGeometry.Scene\Xbim.ModelGeometry.Scene.csproj" />
</ItemGroup>
<ItemGroup>
<None Include="..\Xbim.Geometry.Engine.Interop\bin\$(Configuration)\net47\Xbim.Geometry.Engine32.dll" Link="Xbim.Geometry.Engine32.dll">
<None Include="..\Xbim.Geometry.Engine.Interop\bin\$(Configuration)\net472\Xbim.Geometry.Engine32.dll" Link="Xbim.Geometry.Engine32.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\Xbim.Geometry.Engine.Interop\bin\$(Configuration)\net47\Xbim.Geometry.Engine64.dll" Link="Xbim.Geometry.Engine64.dll">
<None Include="..\Xbim.Geometry.Engine.Interop\bin\$(Configuration)\net472\Xbim.Geometry.Engine64.dll" Link="Xbim.Geometry.Engine64.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
Expand Down
13 changes: 6 additions & 7 deletions Xbim.ModelGeometry.Scene/Xbim.ModelGeometry.Scene.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Description>Provides support for the Geometry Scene creation.</Description>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<EnableUnmanagedDebugging>true</EnableUnmanagedDebugging>
<PackageIcon>logo.png</PackageIcon>
<PackageIcon>xbim-toolkit-icon.png</PackageIcon>
<Version>5.1.0.0-Dev</Version>
<AssemblyVersion>5.1.0.1</AssemblyVersion>
<FileVersion>5.1.0.1</FileVersion>
Expand All @@ -18,18 +18,17 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Xbim.Ifc" Version="5.1.314" />
<PackageReference Include="Xbim.Tessellator" Version="5.1.314" />
<PackageReference Include="Xbim.Ifc" Version="5.1.323" />
<PackageReference Include="Xbim.Tessellator" Version="5.1.323" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Xbim.Geometry.Engine.Interop\Xbim.Geometry.Engine.Interop.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="..\xbim-toolkit-icon.png" Pack="True" PackagePath="\" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Configuration" />
</ItemGroup>
<ItemGroup>
<None Include="..\xbim-toolkit-icon.png" Pack="True" PackagePath="\" />
</ItemGroup>
</Project>

0 comments on commit 02ce514

Please sign in to comment.