public void HlrPolyGeneration() { // Create simple geometry var imprint = TestGeomGenerator.CreateImprint(); Assert.IsTrue(imprint.Make(Shape.MakeFlags.None)); var ocShape = imprint.GetTransformedBRep(); // Create HLR Algo var hlrAlgo = new HlrBRepAlgoPoly(new[] { ocShape }); hlrAlgo.SetProjection(_Projection); hlrAlgo.Update(); // Get Hlr Shape var visibleSharp = hlrAlgo.GetResult(HlrEdgeType.VisibleSharp); Assert.IsNotNull(visibleSharp); Assert.IsTrue(ModelCompare.CompareShape(visibleSharp, Path.Combine(_BasePath, "Poly_VisSharp"))); var hiddenSharp = hlrAlgo.GetResult(HlrEdgeType.HiddenSharp); Assert.IsNotNull(hiddenSharp); Assert.IsTrue(ModelCompare.CompareShape(hiddenSharp, Path.Combine(_BasePath, "Poly_HidSharp"))); }
public void GenerateHlrPolyMultiShape() { // Create simple geometry var imprint = TestGeomGenerator.CreateImprint(); Assert.IsTrue(imprint.Make(Shape.MakeFlags.None)); var ocShape = imprint.GetTransformedBRep(); var box = new Box() { DimensionX = 10, DimensionY = 10, DimensionZ = 10 }; Assert.IsTrue(box.Make(Shape.MakeFlags.None)); var ocBoxShape = box.GetBRep(); // Create HLR Algo var hlrAlgo = new HlrBRepAlgoPoly(new[] { ocShape, ocBoxShape }); hlrAlgo.SetProjection(_Projection); hlrAlgo.Update(); // Get Hlr Shape var visibleSharp = hlrAlgo.GetResult(HlrEdgeType.VisibleSharp); Assert.IsNotNull(visibleSharp); Assert.IsTrue(ModelCompare.CompareShape(visibleSharp, Path.Combine(_BasePath, "PolyMultiShape_VisSharp"))); }