From a9bdd54d1d5c930cb9b8a720a26407ddf31a89a1 Mon Sep 17 00:00:00 2001 From: aan Date: Tue, 6 Dec 2016 17:35:22 +0300 Subject: [PATCH] 0028148: Samples - add 3D Viewer sample for iOS platform Sample that uses UIKit has been added. - Import of STEP files is provided - Zoom, Rotate, Pan actions are provided - Selection of solids is supported --- samples/ios/UIKitSample/ReadMe.md | 16 + .../UIKitSample.xcodeproj/project.pbxproj | 565 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../ios/UIKitSample/UIKitSample/AppDelegate.h | 23 + .../UIKitSample/UIKitSample/AppDelegate.mm | 67 +++ .../AppIcon.appiconset/Contents.json | 62 ++ .../AppIcon.appiconset/Icon-60@2x.png | Bin 0 -> 6596 bytes .../AppIcon.appiconset/Icon-76.png | Bin 0 -> 3730 bytes .../AppIcon.appiconset/Icon-76@2x.png | Bin 0 -> 9112 bytes .../AppIcon.appiconset/Icon-Small-40.png | Bin 0 -> 1672 bytes .../AppIcon.appiconset/Icon-Small-40@2x.png | Bin 0 -> 3936 bytes .../AppIcon.appiconset/Icon-Small.png | Bin 0 -> 1110 bytes .../AppIcon.appiconset/Icon-Small@2x.png | Bin 0 -> 2609 bytes .../Base.lproj/LaunchScreen.storyboard | 27 + .../ios/UIKitSample/UIKitSample/CafShapePrs.h | 64 ++ .../UIKitSample/UIKitSample/CafShapePrs.mm | 31 + samples/ios/UIKitSample/UIKitSample/GLView.h | 40 ++ samples/ios/UIKitSample/UIKitSample/GLView.mm | 160 +++++ .../UIKitSample/GLViewController.h | 32 + .../UIKitSample/GLViewController.mm | 281 +++++++++ .../ios/UIKitSample/UIKitSample/Info.plist | 46 ++ .../UIKitSample/UIKitSample/OcctDocument.h | 42 ++ .../UIKitSample/UIKitSample/OcctDocument.mm | 82 +++ .../ios/UIKitSample/UIKitSample/OcctViewer.h | 98 +++ .../ios/UIKitSample/UIKitSample/OcctViewer.mm | 396 ++++++++++++ .../UIKitSample/UIKitSample/ViewController.h | 15 + .../UIKitSample/UIKitSample/ViewController.m | 30 + samples/ios/UIKitSample/UIKitSample/main.mm | 24 + 28 files changed, 2108 insertions(+) create mode 100644 samples/ios/UIKitSample/ReadMe.md create mode 100644 samples/ios/UIKitSample/UIKitSample.xcodeproj/project.pbxproj create mode 100644 samples/ios/UIKitSample/UIKitSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 samples/ios/UIKitSample/UIKitSample/AppDelegate.h create mode 100644 samples/ios/UIKitSample/UIKitSample/AppDelegate.mm create mode 100644 samples/ios/UIKitSample/UIKitSample/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 samples/ios/UIKitSample/UIKitSample/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png create mode 100644 samples/ios/UIKitSample/UIKitSample/Assets.xcassets/AppIcon.appiconset/Icon-76.png create mode 100644 samples/ios/UIKitSample/UIKitSample/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png create mode 100644 samples/ios/UIKitSample/UIKitSample/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png create mode 100644 samples/ios/UIKitSample/UIKitSample/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png create mode 100644 samples/ios/UIKitSample/UIKitSample/Assets.xcassets/AppIcon.appiconset/Icon-Small.png create mode 100644 samples/ios/UIKitSample/UIKitSample/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png create mode 100644 samples/ios/UIKitSample/UIKitSample/Base.lproj/LaunchScreen.storyboard create mode 100644 samples/ios/UIKitSample/UIKitSample/CafShapePrs.h create mode 100644 samples/ios/UIKitSample/UIKitSample/CafShapePrs.mm create mode 100644 samples/ios/UIKitSample/UIKitSample/GLView.h create mode 100644 samples/ios/UIKitSample/UIKitSample/GLView.mm create mode 100644 samples/ios/UIKitSample/UIKitSample/GLViewController.h create mode 100644 samples/ios/UIKitSample/UIKitSample/GLViewController.mm create mode 100644 samples/ios/UIKitSample/UIKitSample/Info.plist create mode 100644 samples/ios/UIKitSample/UIKitSample/OcctDocument.h create mode 100644 samples/ios/UIKitSample/UIKitSample/OcctDocument.mm create mode 100644 samples/ios/UIKitSample/UIKitSample/OcctViewer.h create mode 100644 samples/ios/UIKitSample/UIKitSample/OcctViewer.mm create mode 100644 samples/ios/UIKitSample/UIKitSample/ViewController.h create mode 100644 samples/ios/UIKitSample/UIKitSample/ViewController.m create mode 100644 samples/ios/UIKitSample/UIKitSample/main.mm diff --git a/samples/ios/UIKitSample/ReadMe.md b/samples/ios/UIKitSample/ReadMe.md new file mode 100644 index 0000000000..524866d846 --- /dev/null +++ b/samples/ios/UIKitSample/ReadMe.md @@ -0,0 +1,16 @@ +// This file contains a description of the UIKitSample and step-by-step instructions how to build and run it. + +Installation and configuration: + 1. Make sure you are running Mac OS version 10.12.1 or above and properly installed XCode version 8.1 or above. + 2. Install Open CASCADE Technology (OCCT) and build static libraries for desired device or/and simulator on your workstation. + 3. Build or download Freetype2 static library for desired device or/and simulator. + 4. Open UIKitSample in XCode. + 5. Select the UIKitSample project and add the OCCT static libraries and Freetype2 static library. + 6. Select the UIKitSample and go to the "Build Settings" tab. After go to the section "Search Paths" and in the field "Header Search Paths" specify a path to the OCCT inc folder. Next in the field "Library Search Paths" specify a path/paths to the OCCT static libraries and Freetype2 static library folders. + 7. Connect device and build sample for device or choose simulator as a target and build for simulator. + 8. Run sample. + + Description: + UIKitSample consists of the Open CASCADE 3D Viewer which provides import of STEP files and toolbar with three buttons. + The first and second buttons serve for import hardcoded STEP files. The third button displays "About" dialog. + The viewer supports zoom, pan and rotate actions. The viewer supports selection of solids as well. diff --git a/samples/ios/UIKitSample/UIKitSample.xcodeproj/project.pbxproj b/samples/ios/UIKitSample/UIKitSample.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..83043d9aec --- /dev/null +++ b/samples/ios/UIKitSample/UIKitSample.xcodeproj/project.pbxproj @@ -0,0 +1,565 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 0A24B9FA1EB0A7CC00A5F490 /* linkrods.step in Resources */ = {isa = PBXBuildFile; fileRef = 0A24B9F91EB0A7CC00A5F490 /* linkrods.step */; }; + 0A7DEDD61E2D1D0F00267B9B /* libfreetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEDD41E2D1D0900267B9B /* libfreetype.a */; }; + 0A7DEDE71E2D28E300267B9B /* libTKBRep.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEDDE1E2D28C500267B9B /* libTKBRep.a */; }; + 0A7DEDE81E2D28E300267B9B /* libTKernel.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEDDF1E2D28C800267B9B /* libTKernel.a */; }; + 0A7DEDE91E2D28E300267B9B /* libTKG2d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEDE01E2D28CB00267B9B /* libTKG2d.a */; }; + 0A7DEDEA1E2D28E300267B9B /* libTKG3d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEDE11E2D28CE00267B9B /* libTKG3d.a */; }; + 0A7DEDEB1E2D28E300267B9B /* libTKGeomAlgo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEDE21E2D28D200267B9B /* libTKGeomAlgo.a */; }; + 0A7DEDEC1E2D28E300267B9B /* libTKGeomBase.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEDE31E2D28D500267B9B /* libTKGeomBase.a */; }; + 0A7DEDED1E2D28E300267B9B /* libTKMath.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEDE41E2D28D800267B9B /* libTKMath.a */; }; + 0A7DEDEE1E2D28E300267B9B /* libTKShHealing.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEDE51E2D28DC00267B9B /* libTKShHealing.a */; }; + 0A7DEDEF1E2D28E300267B9B /* libTKTopAlgo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEDE61E2D28DF00267B9B /* libTKTopAlgo.a */; }; + 0A7DEDF21E2D297000267B9B /* libTKHLR.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEDF01E2D296900267B9B /* libTKHLR.a */; }; + 0A7DEDF31E2D297000267B9B /* libTKMesh.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEDF11E2D296C00267B9B /* libTKMesh.a */; }; + 0A7DEDF91E2D29FF00267B9B /* libTKCAF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEDF41E2D29EF00267B9B /* libTKCAF.a */; }; + 0A7DEDFA1E2D29FF00267B9B /* libTKCDF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEDF51E2D29F200267B9B /* libTKCDF.a */; }; + 0A7DEDFB1E2D29FF00267B9B /* libTKLCAF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEDF61E2D29F500267B9B /* libTKLCAF.a */; }; + 0A7DEDFC1E2D29FF00267B9B /* libTKV3d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEDF71E2D29F800267B9B /* libTKV3d.a */; }; + 0A7DEDFD1E2D29FF00267B9B /* libTKVCAF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEDF81E2D29FB00267B9B /* libTKVCAF.a */; }; + 0A7DEE2B1E2D2AE000267B9B /* libTKService.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE0B1E2D2A9D00267B9B /* libTKService.a */; }; + 0A7DEE2E1E2D2AE000267B9B /* libTKSTEP.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE0E1E2D2AA800267B9B /* libTKSTEP.a */; }; + 0A7DEE301E2D2AE000267B9B /* libTKSTEPAttr.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE101E2D2AAE00267B9B /* libTKSTEPAttr.a */; }; + 0A7DEE311E2D2AE000267B9B /* libTKSTEPBase.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE111E2D2AB200267B9B /* libTKSTEPBase.a */; }; + 0A7DEE351E2D2AE000267B9B /* libTKXCAF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE151E2D2AC000267B9B /* libTKXCAF.a */; }; + 0A7DEE371E2D2AE000267B9B /* libTKXDESTEP.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE171E2D2AC700267B9B /* libTKXDESTEP.a */; }; + 0A7DEE3E1E2D2B8100267B9B /* libTKBO.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE021E2D2A7F00267B9B /* libTKBO.a */; }; + 0A7DEE3F1E2D2BB000267B9B /* libTKOpenGl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE091E2D2A9700267B9B /* libTKOpenGl.a */; }; + 0A7DEE401E2D2BEA00267B9B /* libTKSTEP209.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE0F1E2D2AAB00267B9B /* libTKSTEP209.a */; }; + 0A7DEE411E2D2C1500267B9B /* libTKXSBase.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE1D1E2D2ADC00267B9B /* libTKXSBase.a */; }; + 0AAE0DE61EAF816E00C1F65B /* screw.step in Resources */ = {isa = PBXBuildFile; fileRef = 0AAE0DE51EAF816D00C1F65B /* screw.step */; }; + 0AE286641EB0D29B00A9D719 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AE286631EB0D29A00A9D719 /* libz.tbd */; }; + 3405C9E01DE2F04E008BADB9 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3405C9DF1DE2F04E008BADB9 /* main.mm */; }; + 3405C9E31DE2F04E008BADB9 /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3405C9E21DE2F04E008BADB9 /* AppDelegate.mm */; }; + 3405C9EB1DE2F04E008BADB9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3405C9EA1DE2F04E008BADB9 /* Assets.xcassets */; }; + 3405C9EE1DE2F04E008BADB9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3405C9EC1DE2F04E008BADB9 /* LaunchScreen.storyboard */; }; + 3405CA781DE303DC008BADB9 /* OcctViewer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3405CA771DE303DC008BADB9 /* OcctViewer.mm */; }; + 3405CA7B1DE31566008BADB9 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3405CA7A1DE31566008BADB9 /* QuartzCore.framework */; }; + 3405CA7D1DE3156D008BADB9 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3405CA7C1DE3156D008BADB9 /* OpenGLES.framework */; }; + 3405CA821DE332AB008BADB9 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3405CA811DE332AB008BADB9 /* UIKit.framework */; }; + 3405CA851DE3331D008BADB9 /* GLView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3405CA841DE3331D008BADB9 /* GLView.mm */; }; + 343FDCA61DE42F37009AEE51 /* GLViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 343FDCA51DE42F37009AEE51 /* GLViewController.mm */; }; + 34424E031DE70100008B56DA /* OcctDocument.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34424E021DE70100008B56DA /* OcctDocument.mm */; }; + 34424E061DE72D2E008B56DA /* CafShapePrs.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34424E051DE72D2E008B56DA /* CafShapePrs.mm */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 0A24B9F91EB0A7CC00A5F490 /* linkrods.step */ = {isa = PBXFileReference; lastKnownFileType = text; name = linkrods.step; path = ../occt/data/step/linkrods.step; sourceTree = ""; }; + 0A7DED6E1E2D15B800267B9B /* dev */ = {isa = PBXFileReference; lastKnownFileType = folder; name = dev; path = ..; sourceTree = ""; }; + 0A7DEDD41E2D1D0900267B9B /* libfreetype.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfreetype.a; path = ../3rdparty/lib/libfreetype.a; sourceTree = ""; }; + 0A7DEDDE1E2D28C500267B9B /* libTKBRep.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKBRep.a; path = ../occt/lib/libTKBRep.a; sourceTree = ""; }; + 0A7DEDDF1E2D28C800267B9B /* libTKernel.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKernel.a; path = ../occt/lib/libTKernel.a; sourceTree = ""; }; + 0A7DEDE01E2D28CB00267B9B /* libTKG2d.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKG2d.a; path = ../occt/lib/libTKG2d.a; sourceTree = ""; }; + 0A7DEDE11E2D28CE00267B9B /* libTKG3d.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKG3d.a; path = ../occt/lib/libTKG3d.a; sourceTree = ""; }; + 0A7DEDE21E2D28D200267B9B /* libTKGeomAlgo.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKGeomAlgo.a; path = ../occt/lib/libTKGeomAlgo.a; sourceTree = ""; }; + 0A7DEDE31E2D28D500267B9B /* libTKGeomBase.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKGeomBase.a; path = ../occt/lib/libTKGeomBase.a; sourceTree = ""; }; + 0A7DEDE41E2D28D800267B9B /* libTKMath.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKMath.a; path = ../occt/lib/libTKMath.a; sourceTree = ""; }; + 0A7DEDE51E2D28DC00267B9B /* libTKShHealing.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKShHealing.a; path = ../occt/lib/libTKShHealing.a; sourceTree = ""; }; + 0A7DEDE61E2D28DF00267B9B /* libTKTopAlgo.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKTopAlgo.a; path = ../occt/lib/libTKTopAlgo.a; sourceTree = ""; }; + 0A7DEDF01E2D296900267B9B /* libTKHLR.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKHLR.a; path = ../occt/lib/libTKHLR.a; sourceTree = ""; }; + 0A7DEDF11E2D296C00267B9B /* libTKMesh.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKMesh.a; path = ../occt/lib/libTKMesh.a; sourceTree = ""; }; + 0A7DEDF41E2D29EF00267B9B /* libTKCAF.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKCAF.a; path = ../occt/lib/libTKCAF.a; sourceTree = ""; }; + 0A7DEDF51E2D29F200267B9B /* libTKCDF.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKCDF.a; path = ../occt/lib/libTKCDF.a; sourceTree = ""; }; + 0A7DEDF61E2D29F500267B9B /* libTKLCAF.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKLCAF.a; path = ../occt/lib/libTKLCAF.a; sourceTree = ""; }; + 0A7DEDF71E2D29F800267B9B /* libTKV3d.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKV3d.a; path = ../occt/lib/libTKV3d.a; sourceTree = ""; }; + 0A7DEDF81E2D29FB00267B9B /* libTKVCAF.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKVCAF.a; path = ../occt/lib/libTKVCAF.a; sourceTree = ""; }; + 0A7DEDFE1E2D2A7200267B9B /* libTKBin.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKBin.a; path = ../occt/lib/libTKBin.a; sourceTree = ""; }; + 0A7DEDFF1E2D2A7600267B9B /* libTKBinL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKBinL.a; path = ../occt/lib/libTKBinL.a; sourceTree = ""; }; + 0A7DEE001E2D2A7900267B9B /* libTKBinTObj.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKBinTObj.a; path = ../occt/lib/libTKBinTObj.a; sourceTree = ""; }; + 0A7DEE011E2D2A7C00267B9B /* libTKBinXCAF.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKBinXCAF.a; path = ../occt/lib/libTKBinXCAF.a; sourceTree = ""; }; + 0A7DEE021E2D2A7F00267B9B /* libTKBO.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKBO.a; path = ../occt/lib/libTKBO.a; sourceTree = ""; }; + 0A7DEE031E2D2A8200267B9B /* libTKBool.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKBool.a; path = ../occt/lib/libTKBool.a; sourceTree = ""; }; + 0A7DEE041E2D2A8500267B9B /* libTKFeat.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKFeat.a; path = ../occt/lib/libTKFeat.a; sourceTree = ""; }; + 0A7DEE051E2D2A8900267B9B /* libTKFillet.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKFillet.a; path = ../occt/lib/libTKFillet.a; sourceTree = ""; }; + 0A7DEE061E2D2A8C00267B9B /* libTKIGES.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKIGES.a; path = ../occt/lib/libTKIGES.a; sourceTree = ""; }; + 0A7DEE071E2D2A8F00267B9B /* libTKMeshVS.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKMeshVS.a; path = ../occt/lib/libTKMeshVS.a; sourceTree = ""; }; + 0A7DEE081E2D2A9300267B9B /* libTKOffset.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKOffset.a; path = ../occt/lib/libTKOffset.a; sourceTree = ""; }; + 0A7DEE091E2D2A9700267B9B /* libTKOpenGl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKOpenGl.a; path = ../occt/lib/libTKOpenGl.a; sourceTree = ""; }; + 0A7DEE0A1E2D2A9A00267B9B /* libTKPrim.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKPrim.a; path = ../occt/lib/libTKPrim.a; sourceTree = ""; }; + 0A7DEE0B1E2D2A9D00267B9B /* libTKService.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKService.a; path = ../occt/lib/libTKService.a; sourceTree = ""; }; + 0A7DEE0C1E2D2AA100267B9B /* libTKStd.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKStd.a; path = ../occt/lib/libTKStd.a; sourceTree = ""; }; + 0A7DEE0D1E2D2AA400267B9B /* libTKStdL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKStdL.a; path = ../occt/lib/libTKStdL.a; sourceTree = ""; }; + 0A7DEE0E1E2D2AA800267B9B /* libTKSTEP.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKSTEP.a; path = ../occt/lib/libTKSTEP.a; sourceTree = ""; }; + 0A7DEE0F1E2D2AAB00267B9B /* libTKSTEP209.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKSTEP209.a; path = ../occt/lib/libTKSTEP209.a; sourceTree = ""; }; + 0A7DEE101E2D2AAE00267B9B /* libTKSTEPAttr.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKSTEPAttr.a; path = ../occt/lib/libTKSTEPAttr.a; sourceTree = ""; }; + 0A7DEE111E2D2AB200267B9B /* libTKSTEPBase.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKSTEPBase.a; path = ../occt/lib/libTKSTEPBase.a; sourceTree = ""; }; + 0A7DEE121E2D2AB500267B9B /* libTKSTL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKSTL.a; path = ../occt/lib/libTKSTL.a; sourceTree = ""; }; + 0A7DEE131E2D2AB900267B9B /* libTKTObj.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKTObj.a; path = ../occt/lib/libTKTObj.a; sourceTree = ""; }; + 0A7DEE141E2D2ABC00267B9B /* libTKVRML.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKVRML.a; path = ../occt/lib/libTKVRML.a; sourceTree = ""; }; + 0A7DEE151E2D2AC000267B9B /* libTKXCAF.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXCAF.a; path = ../occt/lib/libTKXCAF.a; sourceTree = ""; }; + 0A7DEE161E2D2AC300267B9B /* libTKXDEIGES.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXDEIGES.a; path = ../occt/lib/libTKXDEIGES.a; sourceTree = ""; }; + 0A7DEE171E2D2AC700267B9B /* libTKXDESTEP.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXDESTEP.a; path = ../occt/lib/libTKXDESTEP.a; sourceTree = ""; }; + 0A7DEE181E2D2ACA00267B9B /* libTKXMesh.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXMesh.a; path = ../occt/lib/libTKXMesh.a; sourceTree = ""; }; + 0A7DEE191E2D2ACE00267B9B /* libTKXml.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXml.a; path = ../occt/lib/libTKXml.a; sourceTree = ""; }; + 0A7DEE1A1E2D2AD100267B9B /* libTKXmlL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXmlL.a; path = ../occt/lib/libTKXmlL.a; sourceTree = ""; }; + 0A7DEE1B1E2D2AD500267B9B /* libTKXmlTObj.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXmlTObj.a; path = ../occt/lib/libTKXmlTObj.a; sourceTree = ""; }; + 0A7DEE1C1E2D2AD900267B9B /* libTKXmlXCAF.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXmlXCAF.a; path = ../occt/lib/libTKXmlXCAF.a; sourceTree = ""; }; + 0A7DEE1D1E2D2ADC00267B9B /* libTKXSBase.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXSBase.a; path = ../occt/lib/libTKXSBase.a; sourceTree = ""; }; + 0AAE0DE51EAF816D00C1F65B /* screw.step */ = {isa = PBXFileReference; lastKnownFileType = text; name = screw.step; path = ../occt/data/step/screw.step; sourceTree = ""; }; + 0AE286631EB0D29A00A9D719 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; + 3405C9DB1DE2F04E008BADB9 /* UIKitSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UIKitSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 3405C9DF1DE2F04E008BADB9 /* main.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = ""; }; + 3405C9E11DE2F04E008BADB9 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 3405C9E21DE2F04E008BADB9 /* AppDelegate.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; path = AppDelegate.mm; sourceTree = ""; }; + 3405C9EA1DE2F04E008BADB9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 3405C9ED1DE2F04E008BADB9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 3405C9EF1DE2F04E008BADB9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 3405CA761DE30380008BADB9 /* OcctViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OcctViewer.h; sourceTree = ""; }; + 3405CA771DE303DC008BADB9 /* OcctViewer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = OcctViewer.mm; sourceTree = ""; }; + 3405CA7A1DE31566008BADB9 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + 3405CA7C1DE3156D008BADB9 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; + 3405CA811DE332AB008BADB9 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 3405CA831DE3331D008BADB9 /* GLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLView.h; sourceTree = ""; }; + 3405CA841DE3331D008BADB9 /* GLView.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = GLView.mm; sourceTree = ""; }; + 343FDCA41DE42D12009AEE51 /* GLViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GLViewController.h; sourceTree = ""; }; + 343FDCA51DE42F37009AEE51 /* GLViewController.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = GLViewController.mm; sourceTree = ""; }; + 34424E011DE6FF05008B56DA /* OcctDocument.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OcctDocument.h; sourceTree = ""; }; + 34424E021DE70100008B56DA /* OcctDocument.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = OcctDocument.mm; sourceTree = ""; }; + 34424E041DE72C23008B56DA /* CafShapePrs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CafShapePrs.h; sourceTree = ""; }; + 34424E051DE72D2E008B56DA /* CafShapePrs.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = CafShapePrs.mm; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 3405C9D81DE2F04E008BADB9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0AE286641EB0D29B00A9D719 /* libz.tbd in Frameworks */, + 0A7DEE411E2D2C1500267B9B /* libTKXSBase.a in Frameworks */, + 0A7DEE401E2D2BEA00267B9B /* libTKSTEP209.a in Frameworks */, + 0A7DEE3F1E2D2BB000267B9B /* libTKOpenGl.a in Frameworks */, + 0A7DEE3E1E2D2B8100267B9B /* libTKBO.a in Frameworks */, + 0A7DEE2B1E2D2AE000267B9B /* libTKService.a in Frameworks */, + 0A7DEE2E1E2D2AE000267B9B /* libTKSTEP.a in Frameworks */, + 0A7DEE301E2D2AE000267B9B /* libTKSTEPAttr.a in Frameworks */, + 0A7DEE311E2D2AE000267B9B /* libTKSTEPBase.a in Frameworks */, + 0A7DEE351E2D2AE000267B9B /* libTKXCAF.a in Frameworks */, + 0A7DEE371E2D2AE000267B9B /* libTKXDESTEP.a in Frameworks */, + 0A7DEDE71E2D28E300267B9B /* libTKBRep.a in Frameworks */, + 0A7DEDF91E2D29FF00267B9B /* libTKCAF.a in Frameworks */, + 0A7DEDFA1E2D29FF00267B9B /* libTKCDF.a in Frameworks */, + 0A7DEDE81E2D28E300267B9B /* libTKernel.a in Frameworks */, + 0A7DEDE91E2D28E300267B9B /* libTKG2d.a in Frameworks */, + 0A7DEDEA1E2D28E300267B9B /* libTKG3d.a in Frameworks */, + 0A7DEDEB1E2D28E300267B9B /* libTKGeomAlgo.a in Frameworks */, + 0A7DEDEC1E2D28E300267B9B /* libTKGeomBase.a in Frameworks */, + 0A7DEDF21E2D297000267B9B /* libTKHLR.a in Frameworks */, + 0A7DEDFB1E2D29FF00267B9B /* libTKLCAF.a in Frameworks */, + 0A7DEDED1E2D28E300267B9B /* libTKMath.a in Frameworks */, + 0A7DEDF31E2D297000267B9B /* libTKMesh.a in Frameworks */, + 0A7DEDEE1E2D28E300267B9B /* libTKShHealing.a in Frameworks */, + 0A7DEDEF1E2D28E300267B9B /* libTKTopAlgo.a in Frameworks */, + 0A7DEDFC1E2D29FF00267B9B /* libTKV3d.a in Frameworks */, + 0A7DEDFD1E2D29FF00267B9B /* libTKVCAF.a in Frameworks */, + 0A7DEDD61E2D1D0F00267B9B /* libfreetype.a in Frameworks */, + 3405CA821DE332AB008BADB9 /* UIKit.framework in Frameworks */, + 3405CA7D1DE3156D008BADB9 /* OpenGLES.framework in Frameworks */, + 3405CA7B1DE31566008BADB9 /* QuartzCore.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 3405C9D21DE2F04E008BADB9 = { + isa = PBXGroup; + children = ( + 0A24B9F91EB0A7CC00A5F490 /* linkrods.step */, + 0AAE0DE51EAF816D00C1F65B /* screw.step */, + 3405C9DD1DE2F04E008BADB9 /* UIKitSample */, + 3405C9DC1DE2F04E008BADB9 /* Products */, + 3405CA791DE31565008BADB9 /* Frameworks */, + ); + sourceTree = ""; + }; + 3405C9DC1DE2F04E008BADB9 /* Products */ = { + isa = PBXGroup; + children = ( + 3405C9DB1DE2F04E008BADB9 /* UIKitSample.app */, + ); + name = Products; + sourceTree = ""; + }; + 3405C9DD1DE2F04E008BADB9 /* UIKitSample */ = { + isa = PBXGroup; + children = ( + 34424E051DE72D2E008B56DA /* CafShapePrs.mm */, + 34424E041DE72C23008B56DA /* CafShapePrs.h */, + 34424E011DE6FF05008B56DA /* OcctDocument.h */, + 34424E021DE70100008B56DA /* OcctDocument.mm */, + 3405CA841DE3331D008BADB9 /* GLView.mm */, + 3405CA831DE3331D008BADB9 /* GLView.h */, + 343FDCA51DE42F37009AEE51 /* GLViewController.mm */, + 343FDCA41DE42D12009AEE51 /* GLViewController.h */, + 3405CA761DE30380008BADB9 /* OcctViewer.h */, + 3405CA771DE303DC008BADB9 /* OcctViewer.mm */, + 3405C9E11DE2F04E008BADB9 /* AppDelegate.h */, + 3405C9E21DE2F04E008BADB9 /* AppDelegate.mm */, + 3405C9EA1DE2F04E008BADB9 /* Assets.xcassets */, + 3405C9EC1DE2F04E008BADB9 /* LaunchScreen.storyboard */, + 3405C9EF1DE2F04E008BADB9 /* Info.plist */, + 3405C9DE1DE2F04E008BADB9 /* Supporting Files */, + ); + path = UIKitSample; + sourceTree = ""; + }; + 3405C9DE1DE2F04E008BADB9 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 3405C9DF1DE2F04E008BADB9 /* main.mm */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 3405CA791DE31565008BADB9 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 0AE286631EB0D29A00A9D719 /* libz.tbd */, + 0A7DEDFE1E2D2A7200267B9B /* libTKBin.a */, + 0A7DEDFF1E2D2A7600267B9B /* libTKBinL.a */, + 0A7DEE001E2D2A7900267B9B /* libTKBinTObj.a */, + 0A7DEE011E2D2A7C00267B9B /* libTKBinXCAF.a */, + 0A7DEE021E2D2A7F00267B9B /* libTKBO.a */, + 0A7DEE031E2D2A8200267B9B /* libTKBool.a */, + 0A7DEE041E2D2A8500267B9B /* libTKFeat.a */, + 0A7DEE051E2D2A8900267B9B /* libTKFillet.a */, + 0A7DEE061E2D2A8C00267B9B /* libTKIGES.a */, + 0A7DEE071E2D2A8F00267B9B /* libTKMeshVS.a */, + 0A7DEE081E2D2A9300267B9B /* libTKOffset.a */, + 0A7DEE091E2D2A9700267B9B /* libTKOpenGl.a */, + 0A7DEE0A1E2D2A9A00267B9B /* libTKPrim.a */, + 0A7DEE0B1E2D2A9D00267B9B /* libTKService.a */, + 0A7DEE0C1E2D2AA100267B9B /* libTKStd.a */, + 0A7DEE0D1E2D2AA400267B9B /* libTKStdL.a */, + 0A7DEE0E1E2D2AA800267B9B /* libTKSTEP.a */, + 0A7DEE0F1E2D2AAB00267B9B /* libTKSTEP209.a */, + 0A7DEE101E2D2AAE00267B9B /* libTKSTEPAttr.a */, + 0A7DEE111E2D2AB200267B9B /* libTKSTEPBase.a */, + 0A7DEE121E2D2AB500267B9B /* libTKSTL.a */, + 0A7DEE131E2D2AB900267B9B /* libTKTObj.a */, + 0A7DEE141E2D2ABC00267B9B /* libTKVRML.a */, + 0A7DEE151E2D2AC000267B9B /* libTKXCAF.a */, + 0A7DEE161E2D2AC300267B9B /* libTKXDEIGES.a */, + 0A7DEE171E2D2AC700267B9B /* libTKXDESTEP.a */, + 0A7DEE181E2D2ACA00267B9B /* libTKXMesh.a */, + 0A7DEE191E2D2ACE00267B9B /* libTKXml.a */, + 0A7DEE1A1E2D2AD100267B9B /* libTKXmlL.a */, + 0A7DEE1B1E2D2AD500267B9B /* libTKXmlTObj.a */, + 0A7DEE1C1E2D2AD900267B9B /* libTKXmlXCAF.a */, + 0A7DEE1D1E2D2ADC00267B9B /* libTKXSBase.a */, + 0A7DEDF41E2D29EF00267B9B /* libTKCAF.a */, + 0A7DEDF51E2D29F200267B9B /* libTKCDF.a */, + 0A7DEDF61E2D29F500267B9B /* libTKLCAF.a */, + 0A7DEDF71E2D29F800267B9B /* libTKV3d.a */, + 0A7DEDF81E2D29FB00267B9B /* libTKVCAF.a */, + 0A7DEDF01E2D296900267B9B /* libTKHLR.a */, + 0A7DEDF11E2D296C00267B9B /* libTKMesh.a */, + 0A7DEDDE1E2D28C500267B9B /* libTKBRep.a */, + 0A7DEDDF1E2D28C800267B9B /* libTKernel.a */, + 0A7DEDE01E2D28CB00267B9B /* libTKG2d.a */, + 0A7DEDE11E2D28CE00267B9B /* libTKG3d.a */, + 0A7DEDE21E2D28D200267B9B /* libTKGeomAlgo.a */, + 0A7DEDE31E2D28D500267B9B /* libTKGeomBase.a */, + 0A7DEDE41E2D28D800267B9B /* libTKMath.a */, + 0A7DEDE51E2D28DC00267B9B /* libTKShHealing.a */, + 0A7DEDE61E2D28DF00267B9B /* libTKTopAlgo.a */, + 0A7DEDD41E2D1D0900267B9B /* libfreetype.a */, + 0A7DED6E1E2D15B800267B9B /* dev */, + 3405CA811DE332AB008BADB9 /* UIKit.framework */, + 3405CA7C1DE3156D008BADB9 /* OpenGLES.framework */, + 3405CA7A1DE31566008BADB9 /* QuartzCore.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 3405C9DA1DE2F04E008BADB9 /* UIKitSample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3405CA081DE2F04E008BADB9 /* Build configuration list for PBXNativeTarget "UIKitSample" */; + buildPhases = ( + 3405C9D71DE2F04E008BADB9 /* Sources */, + 3405C9D81DE2F04E008BADB9 /* Frameworks */, + 3405C9D91DE2F04E008BADB9 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = UIKitSample; + productName = UIKitSample; + productReference = 3405C9DB1DE2F04E008BADB9 /* UIKitSample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 3405C9D31DE2F04E008BADB9 /* Project object */ = { + isa = PBXProject; + attributes = { + CLASSPREFIX = ""; + LastUpgradeCheck = 0810; + ORGANIZATIONNAME = "OPEN CASCADE"; + TargetAttributes = { + 3405C9DA1DE2F04E008BADB9 = { + CreatedOnToolsVersion = 8.1; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = 3405C9D61DE2F04E008BADB9 /* Build configuration list for PBXProject "UIKitSample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 3405C9D21DE2F04E008BADB9; + productRefGroup = 3405C9DC1DE2F04E008BADB9 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 3405C9DA1DE2F04E008BADB9 /* UIKitSample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 3405C9D91DE2F04E008BADB9 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0A24B9FA1EB0A7CC00A5F490 /* linkrods.step in Resources */, + 0AAE0DE61EAF816E00C1F65B /* screw.step in Resources */, + 3405C9EE1DE2F04E008BADB9 /* LaunchScreen.storyboard in Resources */, + 3405C9EB1DE2F04E008BADB9 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 3405C9D71DE2F04E008BADB9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3405C9E31DE2F04E008BADB9 /* AppDelegate.mm in Sources */, + 3405CA851DE3331D008BADB9 /* GLView.mm in Sources */, + 343FDCA61DE42F37009AEE51 /* GLViewController.mm in Sources */, + 34424E031DE70100008B56DA /* OcctDocument.mm in Sources */, + 3405CA781DE303DC008BADB9 /* OcctViewer.mm in Sources */, + 3405C9E01DE2F04E008BADB9 /* main.mm in Sources */, + 34424E061DE72D2E008B56DA /* CafShapePrs.mm in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 3405C9EC1DE2F04E008BADB9 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 3405C9ED1DE2F04E008BADB9 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 3405CA061DE2F04E008BADB9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVES = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_BITCODE = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ""; + IPHONEOS_DEPLOYMENT_TARGET = 10.2; + LIBRARY_SEARCH_PATHS = ""; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = ""; + USE_HEADERMAP = YES; + VALID_ARCHS = "$(ARCHS_STANDARD)"; + }; + name = Debug; + }; + 3405CA071DE2F04E008BADB9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVES = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_BITCODE = NO; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ""; + IPHONEOS_DEPLOYMENT_TARGET = 10.2; + LIBRARY_SEARCH_PATHS = ""; + MTL_ENABLE_DEBUG_INFO = NO; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = ""; + USE_HEADERMAP = YES; + VALIDATE_PRODUCT = YES; + VALID_ARCHS = "$(ARCHS_STANDARD)"; + }; + name = Release; + }; + 3405CA091DE2F04E008BADB9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_CXX_LIBRARY = "libc++"; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + DEVELOPMENT_TEAM = ""; + HEADER_SEARCH_PATHS = ../occt/inc; + INFOPLIST_FILE = UIKitSample/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + ../occt/lib, + ../3rdparty/lib, + ); + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = org.opencascade.ios.sample; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALID_ARCHS = "$(ARCHS_STANDARD)"; + }; + name = Debug; + }; + 3405CA0A1DE2F04E008BADB9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_CXX_LIBRARY = "libc++"; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + DEVELOPMENT_TEAM = ""; + HEADER_SEARCH_PATHS = ../occt/inc; + INFOPLIST_FILE = UIKitSample/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + ../occt/lib, + ../3rdparty/lib, + ); + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = org.opencascade.ios.sample; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALID_ARCHS = "$(ARCHS_STANDARD)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 3405C9D61DE2F04E008BADB9 /* Build configuration list for PBXProject "UIKitSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3405CA061DE2F04E008BADB9 /* Debug */, + 3405CA071DE2F04E008BADB9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3405CA081DE2F04E008BADB9 /* Build configuration list for PBXNativeTarget "UIKitSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3405CA091DE2F04E008BADB9 /* Debug */, + 3405CA0A1DE2F04E008BADB9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 3405C9D31DE2F04E008BADB9 /* Project object */; +} diff --git a/samples/ios/UIKitSample/UIKitSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/ios/UIKitSample/UIKitSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..6a3ecc7e45 --- /dev/null +++ b/samples/ios/UIKitSample/UIKitSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/ios/UIKitSample/UIKitSample/AppDelegate.h b/samples/ios/UIKitSample/UIKitSample/AppDelegate.h new file mode 100644 index 0000000000..09134faa85 --- /dev/null +++ b/samples/ios/UIKitSample/UIKitSample/AppDelegate.h @@ -0,0 +1,23 @@ +// Copyright (c) 2017 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#import + +#import "GLView.h" + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + +@end + diff --git a/samples/ios/UIKitSample/UIKitSample/AppDelegate.mm b/samples/ios/UIKitSample/UIKitSample/AppDelegate.mm new file mode 100644 index 0000000000..b6e2df3838 --- /dev/null +++ b/samples/ios/UIKitSample/UIKitSample/AppDelegate.mm @@ -0,0 +1,67 @@ +// Copyright (c) 2017 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + +@synthesize window=_window; + +- (BOOL)application:(UIApplication *)theApplication didFinishLaunchingWithOptions:(NSDictionary *)theLaunchOptions { + // Override point for customization after application launch. + + CGRect screenBounds = [[UIScreen mainScreen] bounds]; + self.window = [[UIWindow alloc] initWithFrame: screenBounds]; + + GLViewController* aGLViewController = [[GLViewController alloc] init]; + UINavigationController *aNavController = + [[UINavigationController alloc] initWithRootViewController: aGLViewController]; + + self.window.rootViewController = aNavController; + [self.window makeKeyAndVisible]; + + return YES; +} + + +- (void)applicationWillResignActive:(UIApplication *)theApplication { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. +} + + +- (void)applicationDidEnterBackground:(UIApplication *)theApplication { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + + +- (void)applicationWillEnterForeground:(UIApplication *)theApplication { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. +} + + +- (void)applicationDidBecomeActive:(UIApplication *)theApplication { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + + +- (void)applicationWillTerminate:(UIApplication *)theApplication { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + +@end diff --git a/samples/ios/UIKitSample/UIKitSample/Assets.xcassets/AppIcon.appiconset/Contents.json b/samples/ios/UIKitSample/UIKitSample/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..536920e583 --- /dev/null +++ b/samples/ios/UIKitSample/UIKitSample/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,62 @@ +{ + "images" : [ + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-60@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-76.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-76@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-Small-40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-Small-40.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-Small-40@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-Small@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-Small.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-Small@2x.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/samples/ios/UIKitSample/UIKitSample/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png b/samples/ios/UIKitSample/UIKitSample/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..57121a68a41c727724d146e4711f656f574ec47c GIT binary patch literal 6596 zcmbVR^-~lMu;=JFknTIA5fJ%;a7T-DN_T^F9F25KNr;4W2}nz)M|XEOM|T{}^Zg0$ z?QHzE`z1qB6PPF7OwU-kOmz{dQS1uXa{QBbI&%cA%@Rs@4dhZ_UTAGI7H_g!Mtb%iWVxt>j}2%Iivnn zAI3jA%7%DVni-ZV6KAs zvJRd{oq|$il@bi z_1W4Km2Co}whSN5yZPMK4loaO0)u?Rf#pG?>z&uu{cDZyhG+KQuZCZH6SnYEmN;$o zWcN_f*w|v`91rt4PdsfNZCIX?*YkytWxEl|!r{8lhboiksKu)J^FS}UfU>n1$?MfQ zcXvP)rwYqF6|5HO^CT$Bi#c15&KOuq$`E|Nii|MwenZrS()Hm-r&OE^#W4oY{;m!s zli~+roWD%Ly4qM{oZ%zsSAw)0K|24fi@Wlc8R2{q!_Nen=xWION1YbOKfHPt2XQVn zdlA7HV1z2i6coi+)WDGNYMw;~7Loe#@x?**7a#gZzgyQ~V%XP-iT*AJzB=t%4LWS`y;#Mn`6L?j z5#knW`dX7QVIVQVMuxGE_M2i>sD{>!>H=4l^qZ3^&e#L(u`K%<03m@Z?zs1Oke9+* z`{iWBysQ(&1!65;hWvG$Xz1fzT>m{^1hm<=mD=eb7kiv4`uy8*>(`^Qou#$jn4Vh$ zrcSvDw!Uvv5~>}$n0{~6Q9ggxKsilH*&2DqX`^eEDXatdTnZlToSMMzaes=5e!3r! z`E!~T=XoEKQFR!okLPIn2?}(%PU)_N710KB`r!2)O9`gMk6JQK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$j@)Zub{U!LxU7Iy^H=yq-o1p5q+;p#Z zv0dPGdX5Lkex9?|1H~IZ>+7>I5-9hNReCr%%><#<^`ZeLtuApNXJpr2Le;5`)aRc! z@=3k91?cjdQPpN_QTH-Y4^&3=Xof4rqmJ|w7?F;Ki-M*rEV;QjYE*m2VH(uu!UiUM zXZFrNcBQYX-Ta>4oJ)M)U@&2;(vafrG%Z}@UqdCpx{(oM`H$uk{+k_&`--tAB}3!A zSZw~qp1mBu9yzzw3*0Nl1TAv1KRiu=(p!ql!48x020k@FR)7TjSeC8>XDbLd2UtE@ zQ@Qg&_~E~cPQqGlp&$ad+x;)i(7Nyh_$+yzsy^%|P$WD(5Kk53v*)d6jZsZ!>Tx_d zBAId&_2iR>OiukpGv7Vd%GbINXsG`;3nzHND!{kT&kYe^|M#6ik&{xEtoUdW{6C11 B$D05E literal 0 HcmV?d00001 diff --git a/samples/ios/UIKitSample/UIKitSample/Assets.xcassets/AppIcon.appiconset/Icon-76.png b/samples/ios/UIKitSample/UIKitSample/Assets.xcassets/AppIcon.appiconset/Icon-76.png new file mode 100644 index 0000000000000000000000000000000000000000..4fb3f91430089cb9e77e29edaad6c687d2247421 GIT binary patch literal 3730 zcmV;D4sG#?P)D3L!v&07=|JS)?h{6cZ?q z1k$brZE#8n7@P$TA-n>ZN1zDvumKyJHzvj}JuJz3jii}-&h8)Qjx2)!gJqf3&bQWC z8qM5$9^c((-*4}Ipok)hD58iWiYTIpB8n)Yh$4z8qKG1jD58jgf$ZoBd;|j6e!llf z+u`^!5hj3I3nHMJd@0~PcprY>krRY34`Br|h5|Ey(Le^s0jw6)PJLdTpr7`Bcu z*&cK4k1z*#RZ^;05quO8M-j0xIOrvDz~&G|_&8?d+I8?kEwr>iX$iPI)UAgXUj(4k z7`XDv&m_SBw$B5P7(n7a+EE0Y8$}!yMU3j{K~<>-HUf>nB4c<;6;!bVa<>JMF~r{U z_0m%QuwXvJcHITmu0<3u0_il27=b_cd|3Jl|7SyG6qs&E>qgl=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assets/AppIcon.appiconset/Icon-76@2x.png b/samples/ios/UIKitSample/UIKitSample/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..817ddecf1cea2678567824e49035fb55796fb3be GIT binary patch literal 9112 zcmcIq^-~*Mu!Rsb1PSh1iWZmR4yCwj3GPmTLMf0U#hoI>oezS$1t`Vc30|PMmg4Yu z|HFGbbNBvu=I+j(vwLSFHPw~CIFvXjC@A1}%JSMTcl!SxEQ}XV-b>Gbg2H6}PF_aW z@5gcWryr&YjW^wT*J~ea$E-7)lS4aD64d~x5C&AO&{EcKSl^_s^2JG)fS)-D!B|?1 zd7KbU4};m)!)QPtwv05r3?L*SLHeHyU$Uxg?*2*pk9E3_ZoYQup&6CQ+h3$|GjlRd z;3mx{p8Qds?XFQsS-qpzSe&4Vx;@>fIfV22AM6F259u03 z=a!Zi^2SbO+7AFjPy?Y)VBA++%Fx+a`o}w$`BylTz)IaHWUxw89{RQ5(W+UnqvFhFA2Nt z&*a3wqB3z{i$L{?0Ly*3r>d*s0x}L_7C~oNU;#m@c4O}HY#-RU{{-`_2O3B3zhHHR z&!?c;pkdIz4g&mFNu7Ees)}hXww}vJGr1I3Q6WnsMbYlh!zkO^L_u!bs)1~+4gSc0 zWsiEWjMO^ilKH$4L&}Bpjx|fR$$H|(g3eJE6{DjIq@~p{jC$st&|0B#(4*|^%%Z(F zHin*C{`90j zHZ19;w4X&_Dr{pDRQn(N5$aoa$9m}UYtCjVQJpIRXa^yf?jdc?q>fJ54HygPQo+(O z#5kL$mQSbQt7T0wJb;tg@>|j6(*4LRMo6CWoZC>zH(*@B#PPdTIqzJ_4ba&*qhTBH z*OA-PVe5v!Vod`E5(5eIrf3l8iz2a5j2h2!W1;s!3xuLO3q1>c5g(5tDXKHlRv}DD zo%*yHX6@RQA#EMqn{pjc~FkSsjU2PaMwS4(liE3uZb#N}~0N}BG8@Vuv@&ehg%OD*m0vnaem4R_4 zIS7u=Ua!eK-I!Pp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0*4>Dm~E$N zDzIUvu=PtY{&>vib?*f#*q{&B#iZR%l9LO{CaQD(mI(V=Y;EjaPq8IdWN4b{!G4B*Bu7M@W_vBhH~9^=0O7# zo@(LFO>>{7AT_!GN)zaEyn<~fCyu@Pvg#CGwGpX{@o(Gunjk5R5uV3^>5`eJQk?Qd#6iFLhYzQmR%;bjq15W5~N( z`0+(=am02WE+$?kUp|?660t1)Q$Yd9QeZRS8s+2B=IYKGD-?>C6Xe-V*|GkpDfaa) zi}t_9Rp&hmm%g|Ov8cgftq*uqLJVqS5P?S6{NQ`9#E2Z?=HggLRjUA2OT3x;_S(3$ z8>Ipcdi#zh!ANj=f|@^TLt{L*Xt|C4AnzqBU+`mrn%YFMb)*mY(E=LVe#@E zBr+PY-gTA+K+Db|hM#M1p9@?ULGd|}>Hr@JFU6@tP}ov+-}`Eiv^v`dvQ6!ck3MHh zGVPh2YKXi^Jy8Ug@p-JYGK=$UkrgqWgzk8P3V9zDOW;RnhRzTdwqSa~CiQcFN4#NH&dgul1!T_Wav@{40XJGuy09}4#l zH_FQCbeU@ZNU=oY(FuJWQo8tyWHvDMrHZ0zc?hd>2SQt7(Eef8FTX8li9S3zy=KVj z+kdLdo2myH{gcM9tA Ja9Jqqe*ngRUOE5( literal 0 HcmV?d00001 diff --git a/samples/ios/UIKitSample/UIKitSample/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png b/samples/ios/UIKitSample/UIKitSample/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png new file mode 100644 index 0000000000000000000000000000000000000000..d845c8008a86fd15aa2f10da25d57ccfe723d9c4 GIT binary patch literal 1672 zcmV;326y?1P)7PM^*?fT}9Ygt9aS90x?M zjHn1&YpAZGQ3MeoEk08ANqzz7L;`2H`Py1cZPkzvm&NeOGl5cT=>@u!qRkkv76aI^ z*5kU^ARyA#hI{gDBpye#wj%#}9~THtoEY+LgUlO9S5>r<0J0UuLpXd4Y9W7cs(*U?*U;k6UTkgl`Xlg&tP5BAqPu)r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ard new file mode 100644 index 0000000000..fdf3f97d1b --- /dev/null +++ b/samples/ios/UIKitSample/UIKitSample/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/ios/UIKitSample/UIKitSample/CafShapePrs.h b/samples/ios/UIKitSample/UIKitSample/CafShapePrs.h new file mode 100644 index 0000000000..f470dc21b7 --- /dev/null +++ b/samples/ios/UIKitSample/UIKitSample/CafShapePrs.h @@ -0,0 +1,64 @@ +// Copyright (c) 2017 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#ifndef CafShapePrs_h +#define CafShapePrs_h + +#include +#include +#include +#include + +typedef NCollection_DataMap CafDataMapOfShapeColor; +typedef NCollection_DataMap MapOfPrsForShapes; + +//! Interactive object for shape in DECAF document +class CafShapePrs : public XCAFPrs_AISObject +{ + +public: + + //! Default constructor. + CafShapePrs (const TDF_Label& theLabel, + const XCAFPrs_Style& theStyle, + const Graphic3d_MaterialAspect& theMaterial); + + //! Search custom aspect for specified shape. + Standard_Boolean FindCustomAspects (const TopoDS_Shape& theShape, + Handle(AIS_ColoredDrawer)& theAspects) const + { + return myShapeColors.Find (theShape, theAspects); + } + + //! Access the styles map. + const CafDataMapOfShapeColor& ShapeColors() const { return myShapeColors; } + + //! Override default style. + virtual void DefaultStyle (XCAFPrs_Style& theStyle) const Standard_OVERRIDE + { + theStyle = myDefStyle; + } + +protected: + + XCAFPrs_Style myDefStyle; //!< default style + +public: //! @name Declaration of CASCADE RTTI + + DEFINE_STANDARD_RTTIEXT(CafShapePrs, XCAFPrs_AISObject) + +}; + +DEFINE_STANDARD_HANDLE(CafShapePrs, XCAFPrs_AISObject) + +#endif // CafShapePrs_h diff --git a/samples/ios/UIKitSample/UIKitSample/CafShapePrs.mm b/samples/ios/UIKitSample/UIKitSample/CafShapePrs.mm new file mode 100644 index 0000000000..a23e9f02a6 --- /dev/null +++ b/samples/ios/UIKitSample/UIKitSample/CafShapePrs.mm @@ -0,0 +1,31 @@ +// Copyright (c) 2017 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include "CafShapePrs.h" + +#import + +IMPLEMENT_STANDARD_RTTIEXT(CafShapePrs, XCAFPrs_AISObject) + +// ======================================================================= +// function : CafShapePrs +// purpose : +// ======================================================================= +CafShapePrs::CafShapePrs(const TDF_Label& theLabel, + const XCAFPrs_Style& theStyle, + const Graphic3d_MaterialAspect& theMaterial) +: XCAFPrs_AISObject (theLabel), + myDefStyle(theStyle) +{ + SetMaterial(theMaterial); +} diff --git a/samples/ios/UIKitSample/UIKitSample/GLView.h b/samples/ios/UIKitSample/UIKitSample/GLView.h new file mode 100644 index 0000000000..fc47bab31a --- /dev/null +++ b/samples/ios/UIKitSample/UIKitSample/GLView.h @@ -0,0 +1,40 @@ +// Copyright (c) 2017 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#ifndef GLView_h +#define GLView_h + +#import +#import +#include +#include + +#import "GLViewController.h" + +//! Open GL view +@interface GLView : UIView { + +@public + GLViewController* myController; + + EAGLContext* myGLContext; + + int myBackingWidth; + int myBackingHeight; + GLuint myFrameBuffer; + GLuint myRenderBuffer; + GLuint myDepthBuffer; +} + +@end +#endif // GLView_h diff --git a/samples/ios/UIKitSample/UIKitSample/GLView.mm b/samples/ios/UIKitSample/UIKitSample/GLView.mm new file mode 100644 index 0000000000..78881144ca --- /dev/null +++ b/samples/ios/UIKitSample/UIKitSample/GLView.mm @@ -0,0 +1,160 @@ +// Copyright (c) 2017 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#import + +#import "GLView.h" +#import "GLViewController.h" + +@implementation GLView + +// ======================================================================= +// function : layerClass +// purpose : +// ======================================================================= ++ (Class)layerClass +{ + return [CAEAGLLayer class]; +} + +// ======================================================================= +// function : setupLayer +// purpose : +// ======================================================================= +- (void)setupLayer +{ + CAEAGLLayer* anEAGLLayer = (CAEAGLLayer*) self.layer; + anEAGLLayer.opaque = YES; + anEAGLLayer.contentsScale = [[UIScreen mainScreen] scale]; +} + +// ======================================================================= +// function : setupContext +// purpose : +// ======================================================================= +- (void)setupContext +{ + EAGLRenderingAPI aRendApi = kEAGLRenderingAPIOpenGLES2; + myGLContext = [[EAGLContext alloc] initWithAPI:aRendApi]; + if (!myGLContext) { + NSLog(@"Failed to initialize OpenGLES 2.0 context"); + } + + if (![EAGLContext setCurrentContext:myGLContext]) { + NSLog(@"Failed to set current OpenGL context"); + } +} + +// ======================================================================= +// function : createBuffers +// purpose : +// ======================================================================= +- (void) createBuffers +{ + glGenFramebuffers(1, &myFrameBuffer); + glBindFramebuffer(GL_FRAMEBUFFER, myFrameBuffer); + glGenRenderbuffers(1, &myRenderBuffer); + glBindRenderbuffer(GL_RENDERBUFFER, myRenderBuffer); + + [myGLContext renderbufferStorage:GL_RENDERBUFFER fromDrawable:(CAEAGLLayer*)self.layer]; + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, myRenderBuffer); + glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &myBackingWidth); + glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &myBackingHeight); + + glGenRenderbuffers(1, &myDepthBuffer); + glBindRenderbuffer(GL_RENDERBUFFER, myDepthBuffer); + glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, myBackingWidth, myBackingHeight); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, myDepthBuffer); +} + +// ======================================================================= +// function : destroyBuffers +// purpose : +// ======================================================================= +- (void) destroyBuffers +{ + glDeleteFramebuffers(1, &myFrameBuffer); + myFrameBuffer = 0; + glDeleteRenderbuffers(1, &myRenderBuffer); + myRenderBuffer = 0; + glDeleteRenderbuffers(1, &myDepthBuffer); + myDepthBuffer = 0; +} + +// ======================================================================= +// function : drawView +// purpose : +// ======================================================================= +- (void) drawView +{ + glBindFramebuffer(GL_FRAMEBUFFER, myFrameBuffer); + + [myController Draw]; + + glBindRenderbuffer(GL_RENDERBUFFER, myRenderBuffer); + [myGLContext presentRenderbuffer:GL_RENDERBUFFER]; +} + +// ======================================================================= +// function : layoutSubviews +// purpose : +// ======================================================================= +- (void) layoutSubviews +{ + [EAGLContext setCurrentContext:myGLContext]; + + [self destroyBuffers]; + [self createBuffers]; + [self drawView]; + + glBindRenderbuffer(GL_RENDERBUFFER, myRenderBuffer); + + glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &myBackingWidth); + glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &myBackingHeight); + + if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) + { + NSLog(@"Failed to make complete framebuffer object %u", + glCheckFramebufferStatus(GL_FRAMEBUFFER)); + } + + glViewport(0, 0, myBackingWidth, myBackingHeight); + + [myController Setup]; +} + +// ======================================================================= +// function : init +// purpose : +// ======================================================================= +- (id) init +{ + self = [super init]; + + if (self) { + [self setupLayer]; + [self setupContext]; + + myController = NULL; + + myBackingWidth = 0; + myBackingHeight = 0; + myFrameBuffer = 0; + myRenderBuffer = 0; + myDepthBuffer = 0; + } + + return self; +} + +@end diff --git a/samples/ios/UIKitSample/UIKitSample/GLViewController.h b/samples/ios/UIKitSample/UIKitSample/GLViewController.h new file mode 100644 index 0000000000..cc4bf4bbd0 --- /dev/null +++ b/samples/ios/UIKitSample/UIKitSample/GLViewController.h @@ -0,0 +1,32 @@ +// Copyright (c) 2017 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#ifndef GLViewController_h +#define GLViewController_h + +#import + +#import "OcctViewer.h" + +//! Open GL view controller +@interface GLViewController : UIViewController { + OcctViewer* myOcctViewer; + + CGPoint myFirstTouch[2]; +} + +-(void) Draw; +-(void) Setup; + +@end +#endif // GLViewController_h diff --git a/samples/ios/UIKitSample/UIKitSample/GLViewController.mm b/samples/ios/UIKitSample/UIKitSample/GLViewController.mm new file mode 100644 index 0000000000..4c713d36cb --- /dev/null +++ b/samples/ios/UIKitSample/UIKitSample/GLViewController.mm @@ -0,0 +1,281 @@ +// Copyright (c) 2017 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#import + +#import "GLViewController.h" +#import "GLView.h" + +@implementation GLViewController + +// ======================================================================= +// function : init +// purpose : +// ======================================================================= +- (id) init +{ + self = [super init]; + + if (self) { + myOcctViewer = new OcctViewer(); + } + + return self; +} + +// ======================================================================= +// function : Draw +// purpose : +// ======================================================================= +- (void) Draw +{ +} + +// ======================================================================= +// function : Setup +// purpose : +// ======================================================================= +- (void) Setup { + if (!myOcctViewer->InitViewer(self.view)) { + NSLog(@"Failed to init viewer"); + } + else { + [self importScrew:nullptr]; + } +} + +// ======================================================================= +// function : loadView +// purpose : +// ======================================================================= +- (void) loadView +{ + GLView* aGLView = [[GLView alloc] init]; + aGLView->myController = self; + self.view = aGLView; +} + +// ======================================================================= +// function : touchesBegan +// purpose : +// ======================================================================= +- (void)touchesBegan:(NSSet *)theTouches withEvent:(UIEvent *)theEvent +{ + [super touchesBegan:theTouches withEvent:theEvent]; + + UITouch *aTouch = [theTouches anyObject]; + if (aTouch != NULL) { + CGPoint aTouchPoint = [aTouch locationInView:self.view]; + myOcctViewer->StartRotation((int)aTouchPoint.x, (int)aTouchPoint.y); + } +} + +// ======================================================================= +// function : touchesMoved +// purpose : +// ======================================================================= +- (void)touchesMoved:(NSSet *)theTouches withEvent:(UIEvent *)theEvent +{ + [super touchesMoved:theTouches withEvent:theEvent]; + + UITouch *aTouch = [theTouches anyObject]; + if (aTouch != NULL) { + CGPoint aTouchPoint = [aTouch locationInView:self.view]; + myOcctViewer->Rotation((int)aTouchPoint.x, (int)aTouchPoint.y); + } + + return; +} + +// ======================================================================= +// function : viewDidLoad +// purpose : +// ======================================================================= +-(void)viewDidLoad +{ + // add zoom recognizer + UIPinchGestureRecognizer *aZoomRecognizer = [[UIPinchGestureRecognizer alloc] + initWithTarget:self + action:@selector(zoomHandler:)]; + + [[self view] addGestureRecognizer:aZoomRecognizer]; + + // add pan recognizer + UIPanGestureRecognizer *aPanRecognizer = [[UIPanGestureRecognizer alloc] + initWithTarget:self + action:@selector(panHandler:)]; + + aPanRecognizer.maximumNumberOfTouches = 2; + aPanRecognizer.minimumNumberOfTouches = 2; + + [[self view] addGestureRecognizer:aPanRecognizer]; + + UITapGestureRecognizer *aTapRecognizer = [[UITapGestureRecognizer alloc] + initWithTarget:self + action:@selector(tapHandler:)]; + + [[self view] addGestureRecognizer:aTapRecognizer]; + + + // add import buttons + UIBarButtonItem *importScrewBtn = [[UIBarButtonItem alloc] + initWithTitle:@"Sample 1" + style:UIBarButtonItemStylePlain + target:self + action:@selector(importScrew:)]; + + UIBarButtonItem *importLinkrodsBtn = [[UIBarButtonItem alloc] + initWithTitle:@"Sample 2" + style:UIBarButtonItemStylePlain + target:self + action:@selector(importLinkrods:)]; + + UIBarButtonItem *displayAboutDlgBtn = [[UIBarButtonItem alloc] + initWithTitle:@"About" + style:UIBarButtonItemStylePlain + target:self + action:@selector(displayAboutDlg:)]; + + [self.navigationItem setLeftBarButtonItems:[NSArray arrayWithObjects:importScrewBtn, importLinkrodsBtn, nil]]; + [self.navigationItem setRightBarButtonItem: displayAboutDlgBtn]; +} + +// ======================================================================= +// function : zoomHandler +// purpose : +// ======================================================================= +- (void)zoomHandler:(UIPinchGestureRecognizer *)pinchRecognizer +{ + if ([pinchRecognizer numberOfTouches] > 1) + { + UIGestureRecognizerState aState = [pinchRecognizer state]; + if (aState == UIGestureRecognizerStateBegan) + { + myFirstTouch[0] = [pinchRecognizer locationOfTouch:0 inView:self.view]; + myFirstTouch[1] = [pinchRecognizer locationOfTouch:1 inView:self.view]; + } + else if (aState == UIGestureRecognizerStateChanged) { + CGPoint aLastTouch[2] = { + [pinchRecognizer locationOfTouch:0 inView:self.view], + [pinchRecognizer locationOfTouch:1 inView:self.view] + }; + + double aPinchCenterXStart = ( myFirstTouch[0].x + myFirstTouch[1].x ) / 2.0; + double aPinchCenterYStart = ( myFirstTouch[0].y + myFirstTouch[1].y ) / 2.0; + + double aStartDist = Sqrt( ( myFirstTouch[0].x - myFirstTouch[1].x ) * ( myFirstTouch[0].x - myFirstTouch[1].x ) + + ( myFirstTouch[0].y - myFirstTouch[1].y ) * ( myFirstTouch[0].y - myFirstTouch[1].y ) ); + double anEndDist = Sqrt( ( aLastTouch[0].x - aLastTouch[1].x ) * ( aLastTouch[0].x - aLastTouch[1].x ) + + ( aLastTouch[0].y - aLastTouch[1].y ) * ( aLastTouch[0].y - aLastTouch[1].y ) ); + + double aDeltaDist = anEndDist - aStartDist; + + myOcctViewer->Zoom(aPinchCenterXStart, aPinchCenterYStart, aDeltaDist); + + myFirstTouch[0] = aLastTouch[0]; + myFirstTouch[1] = aLastTouch[1]; + } + } +} + +// ======================================================================= +// function : panHandler +// purpose : +// ======================================================================= +- (void)panHandler:(UIPanGestureRecognizer *)panRecognizer +{ + if ([panRecognizer numberOfTouches] > 1) + { + UIGestureRecognizerState aState = [panRecognizer state]; + if (aState == UIGestureRecognizerStateBegan) + { + myFirstTouch[0] = [panRecognizer locationOfTouch:0 inView:self.view]; + myFirstTouch[1] = [panRecognizer locationOfTouch:1 inView:self.view]; + } + else if (aState == UIGestureRecognizerStateChanged) { + CGPoint aLastTouch[2] = { + [panRecognizer locationOfTouch:0 inView:self.view], + [panRecognizer locationOfTouch:1 inView:self.view] + }; + + double aPinchCenterXStart = ( myFirstTouch[0].x + myFirstTouch[1].x ) / 2.0; + double aPinchCenterYStart = ( myFirstTouch[0].y + myFirstTouch[1].y ) / 2.0; + + double aPinchCenterXEnd = ( aLastTouch[0].x + aLastTouch[1].x ) / 2.0; + double aPinchCenterYEnd = ( aLastTouch[0].y + aLastTouch[1].y ) / 2.0; + + double aPinchCenterXDev = aPinchCenterXEnd - aPinchCenterXStart; + double aPinchCenterYDev = aPinchCenterYEnd - aPinchCenterYStart; + + myOcctViewer->Pan((int)aPinchCenterXDev, (int)-aPinchCenterYDev); + } + } +} + +// ======================================================================= +// function : tapHandler +// purpose : +// ======================================================================= +- (void)tapHandler:(UITapGestureRecognizer *)tapRecognizer +{ + CGPoint aTapPoint = [tapRecognizer locationInView:self.view]; + myOcctViewer->Select(aTapPoint.x, aTapPoint.y); +} + +// ======================================================================= +// function : importScrew +// purpose : +// ======================================================================= +- (void)importScrew:(UIBarButtonItem *)theSender +{ + NSString* aNsPath = [[NSBundle mainBundle] pathForResource:@"screw" + ofType:@"step"]; + std::string aPath = std::string([aNsPath UTF8String]); + + myOcctViewer->ImportSTEP(aPath); + myOcctViewer->FitAll(); +} + +// ======================================================================= +// function : importLinkrods +// purpose : +// ======================================================================= +- (void)importLinkrods:(UIBarButtonItem *)theSender +{ + NSString* aNsPath = [[NSBundle mainBundle] pathForResource:@"linkrods" + ofType:@"step"]; + std::string aPath = std::string([aNsPath UTF8String]); + + myOcctViewer->ImportSTEP(aPath); + myOcctViewer->FitAll(); +} + +// ======================================================================= +// function : displayAboutDlg +// purpose : +// ======================================================================= +- (void)displayAboutDlg:(UIBarButtonItem *)theSender +{ + UIAlertController* anAbout = [UIAlertController alertControllerWithTitle:@"About" + message:@"UIKit based application for tutorial to Open CASCADE Technology.\n\n" + @"Copyright (c) 2017 OPEN CASCADE SAS" + preferredStyle:UIAlertControllerStyleAlert]; + + UIAlertAction* aDefaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) {}]; + + [anAbout addAction:aDefaultAction]; + [self presentViewController:anAbout animated:YES completion:nil]; +} + +@end diff --git a/samples/ios/UIKitSample/UIKitSample/Info.plist b/samples/ios/UIKitSample/UIKitSample/Info.plist new file mode 100644 index 0000000000..92faa7fb2e --- /dev/null +++ b/samples/ios/UIKitSample/UIKitSample/Info.plist @@ -0,0 +1,46 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + OCCT Sample + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/samples/ios/UIKitSample/UIKitSample/OcctDocument.h b/samples/ios/UIKitSample/UIKitSample/OcctDocument.h new file mode 100644 index 0000000000..d929377636 --- /dev/null +++ b/samples/ios/UIKitSample/UIKitSample/OcctDocument.h @@ -0,0 +1,42 @@ +// Copyright (c) 2017 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#ifndef OcctDocument_h +#define OcctDocument_h + +#include +#include + +//! The document +class OcctDocument : public Standard_Transient +{ + DEFINE_STANDARD_RTTIEXT(OcctDocument, Standard_Transient) + +public: + Standard_EXPORT OcctDocument(); + + Standard_EXPORT virtual ~OcctDocument(); + + Standard_EXPORT void InitDoc(); + + Standard_EXPORT Handle(TDocStd_Document)& ChangeDocument() { return myOcafDoc; } + Standard_EXPORT const Handle(TDocStd_Document)& Document() const { return myOcafDoc; } + +private: + Handle(XCAFApp_Application) myApp; + Handle(TDocStd_Document) myOcafDoc; +}; + +DEFINE_STANDARD_HANDLE(OcctDocument, Standard_Transient) + +#endif // OcctDocument_h diff --git a/samples/ios/UIKitSample/UIKitSample/OcctDocument.mm b/samples/ios/UIKitSample/UIKitSample/OcctDocument.mm new file mode 100644 index 0000000000..8d33b78ed8 --- /dev/null +++ b/samples/ios/UIKitSample/UIKitSample/OcctDocument.mm @@ -0,0 +1,82 @@ +// Copyright (c) 2017 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#import + +#include "OcctDocument.h" + +#include +#include +#include + +#include + +IMPLEMENT_STANDARD_RTTIEXT(OcctDocument, Standard_Transient) + +// ======================================================================= +// function : OcctViewer +// purpose : +// ======================================================================= +OcctDocument::OcctDocument() +{ + try { + OCC_CATCH_SIGNALS + + myApp = XCAFApp_Application::GetApplication(); + } catch (Standard_Failure) { + Message::DefaultMessenger()->Send (TCollection_AsciiString("Error in creating application") + + Standard_Failure::Caught()->GetMessageString(), Message_Fail); + } +} + +// ======================================================================= +// function : OcctDocument +// purpose : +// ======================================================================= +OcctDocument::~OcctDocument() +{ +} + +// ======================================================================= +// function : InitDoc +// purpose : +// ======================================================================= +void OcctDocument::InitDoc() +{ + // close old document + if (!myOcafDoc.IsNull()) + { + if (myOcafDoc->HasOpenCommand()) + { + myOcafDoc->AbortCommand(); + } + + myOcafDoc->Main().Root().ForgetAllAttributes(Standard_True); + + myApp->Close(myOcafDoc); + + myOcafDoc.Nullify(); + } + + // create a new document + myApp->NewDocument(TCollection_ExtendedString("BinXCAF"), myOcafDoc); + + // set maximum number of available "undo" actions + if (!myOcafDoc.IsNull()) + { + myOcafDoc->SetUndoLimit(10); + } +} + + + diff --git a/samples/ios/UIKitSample/UIKitSample/OcctViewer.h b/samples/ios/UIKitSample/UIKitSample/OcctViewer.h new file mode 100644 index 0000000000..69120f1120 --- /dev/null +++ b/samples/ios/UIKitSample/UIKitSample/OcctViewer.h @@ -0,0 +1,98 @@ +// Copyright (c) 2017 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#ifndef OcctViewer_H +#define OcctViewer_H + +#include "OcctDocument.h" +#include "CafShapePrs.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#import + +//! OCCT 3D Viewer holder. +class OcctViewer +{ +public: + + //! Empty constructor. + Standard_EXPORT OcctViewer(); + + //! Destructor. + Standard_EXPORT virtual ~OcctViewer(); + + //! Release the viewer. + Standard_EXPORT void release(); + +public: + + //! Return viewer instance. + const Handle(V3d_Viewer)& V3dViewer() const { return myViewer; } + + //! Return active view. + const Handle(V3d_View)& ActiveView() const { return myView; } + + //! Interactive context. + const Handle(AIS_InteractiveContext)& AisContex() const { return myContext; } + + //! Invalidate active viewer. + void Invalidate() + { + myView->Invalidate(); + } + +public: + + //! Perform OCCT Viewer (re)initialization. + Standard_EXPORT bool InitViewer (UIView* theWin); + + Standard_EXPORT void FitAll(); + + Standard_EXPORT void StartRotation(int theX, int theY); + Standard_EXPORT void Rotation(int theX, int theY); + Standard_EXPORT void Pan(int theX, int theY); + Standard_EXPORT void Zoom(int theX, int theY, double theDelta); + Standard_EXPORT void Select(int theX, int theY); + + Standard_EXPORT bool ImportSTEP(std::string theFilename); + +private: + void clearSession(const Handle(XSControl_WorkSession)& theSession); + + void displayWithChildren (XCAFDoc_ShapeTool& theShapeTool, + XCAFDoc_ColorTool& theColorTool, + const TDF_Label& theLabel, + const TopLoc_Location& theParentTrsf, + const XCAFPrs_Style& theParentStyle, + const TCollection_AsciiString& theParentId, + MapOfPrsForShapes& theMapOfShapes); + void clearContext(); + +protected: + + Handle(V3d_Viewer) myViewer; //!< main viewer + Handle(V3d_View) myView; //!< main view + Handle(AIS_InteractiveContext) myContext; //!< interactive context containing displayed objects + Handle(OcctDocument) myDoc; +}; + +#endif // OcctViewer_H diff --git a/samples/ios/UIKitSample/UIKitSample/OcctViewer.mm b/samples/ios/UIKitSample/UIKitSample/OcctViewer.mm new file mode 100644 index 0000000000..c1d3aba89d --- /dev/null +++ b/samples/ios/UIKitSample/UIKitSample/OcctViewer.mm @@ -0,0 +1,396 @@ +// Copyright (c) 2017 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include "OcctViewer.h" +#include "OcctDocument.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// ======================================================================= +// function : OcctViewer +// purpose : +// ======================================================================= +OcctViewer::OcctViewer() +{ + myDoc = new OcctDocument(); +} + +// ======================================================================= +// function : ~OcctViewer +// purpose : +// ======================================================================= +OcctViewer::~OcctViewer() +{ + // +} + +// ======================================================================= +// function : release +// purpose : +// ======================================================================= +void OcctViewer::release() +{ + myContext.Nullify(); + if (!myView.IsNull()) + { + myView->Remove(); + } + myView.Nullify(); + myViewer.Nullify(); + + myDoc.Nullify(); +} + +// ======================================================================= +// function : InitViewer +// purpose : +// ======================================================================= +bool OcctViewer::InitViewer (UIView* theWin) +{ + EAGLContext* aRendCtx = [EAGLContext currentContext]; + if (theWin == NULL || aRendCtx == NULL) + { + NSLog(@"Error: No active EAGL context!"); + release(); + return false; + } + + if (!myView.IsNull()) + { + myView->MustBeResized(); + myView->Invalidate(); + } + else + { + Handle(Aspect_DisplayConnection) aDisplayConnection = new Aspect_DisplayConnection(); + Handle(Graphic3d_GraphicDriver) aGraphicDriver = new OpenGl_GraphicDriver(aDisplayConnection); + + // Create Viewer + myViewer = new V3d_Viewer(aGraphicDriver); + myViewer->SetDefaultLights(); + myViewer->SetLightOn(); + + // Create AIS context + myContext = new AIS_InteractiveContext(myViewer); + myContext->SetDisplayMode((int)AIS_DisplayMode::AIS_Shaded, false); + + myView = myViewer->CreateView(); + myView->TriedronDisplay (Aspect_TOTP_LEFT_LOWER, Quantity_NOC_WHITE, 0.20, V3d_ZBUFFER); + + Handle(Cocoa_Window) aCocoaWindow = new Cocoa_Window(theWin); + myView->SetWindow(aCocoaWindow, aRendCtx); + if (!aCocoaWindow->IsMapped()) + { + aCocoaWindow->Map(); + } + + myView->Redraw(); + myView->MustBeResized(); + } + + return true; +} + +// ======================================================================= +// function : FitAll +// purpose : +// ======================================================================= +void OcctViewer::FitAll() +{ + if (!myView.IsNull()) + { + myView->FitAll(); + myView->ZFitAll(); + } +} + +// ======================================================================= +// function : StartRotation +// purpose : +// ======================================================================= +void OcctViewer::StartRotation(int theX, int theY) +{ + if (!myView.IsNull()) + { + myView->StartRotation(theX, theY); + } +} + +// ======================================================================= +// function : Rotation +// purpose : +// ======================================================================= +void OcctViewer::Rotation(int theX, int theY) +{ + if (!myView.IsNull()) + { + myView->Rotation(theX, theY); + } +} + +// ======================================================================= +// function : Pan +// purpose : +// ======================================================================= +void OcctViewer::Pan(int theX, int theY) +{ + if (!myView.IsNull()) + { + myView->Pan(theX, theY, 1, Standard_False); + } +} + +// ======================================================================= +// function : Zoom +// purpose : +// ======================================================================= +void OcctViewer::Zoom(int theX, int theY, double theDelta) +{ + if (!myView.IsNull()) + { + if (theX >=0 && theY >=0) + { + myView->StartZoomAtPoint(theX, theY); + myView->ZoomAtPoint(0, 0, (int) theDelta, (int) theDelta); + } + else + { + double aCoeff = Abs(theDelta) / 100.0 + 1.0; + aCoeff = theDelta > 0.0 ? aCoeff : 1.0 / aCoeff; + myView->SetZoom(aCoeff, Standard_True); + } + } +} + +// ======================================================================= +// function : Select +// purpose : +// ======================================================================= +void OcctViewer::Select(int theX, int theY) +{ + if (!myContext.IsNull()) + { + myContext->ClearSelected(Standard_False); + myContext->MoveTo(theX, theY, myView, Standard_False); + myContext->Select(Standard_False); + } +} + +// ======================================================================= +// function : ImportSTEP +// purpose : +// ======================================================================= +bool OcctViewer::ImportSTEP(std::string theFilename) +{ + // create a new document + myDoc->InitDoc(); + + STEPCAFControl_Reader aReader; + Handle(XSControl_WorkSession) aSession = aReader.Reader().WS(); + + try { + if (!aReader.ReadFile (theFilename.c_str())) + { + clearSession (aSession); + return false; + } + + if (!aReader.Transfer (myDoc->ChangeDocument())) + { + clearSession (aSession); + return false; + } + + clearSession(aSession); + } catch (Standard_Failure theFailure) { + Message::DefaultMessenger()->Send (TCollection_AsciiString ("Exception raised during STEP import\n[") + + theFailure.GetMessageString() + "]\n" + theFilename.c_str(), Message_Fail); + return false; + } + + Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool (myDoc->Document()->Main()); + Handle(XCAFDoc_ColorTool) aColorTool = XCAFDoc_DocumentTool::ColorTool (myDoc->Document()->Main()); + + TDF_LabelSequence aLabels; + aShapeTool->GetFreeShapes (aLabels); + + // perform meshing explicitly + TopoDS_Compound aCompound; + BRep_Builder aBuildTool; + aBuildTool.MakeCompound (aCompound); + for (Standard_Integer aLabIter = 1; aLabIter <= aLabels.Length(); ++aLabIter) + { + TopoDS_Shape aShape; + const TDF_Label& aLabel = aLabels.Value (aLabIter); + if (XCAFDoc_ShapeTool::GetShape (aLabel, aShape)) + { + aBuildTool.Add (aCompound, aShape); + } + } + + Handle(Prs3d_Drawer) aDrawer = myContext->DefaultDrawer(); + Standard_Real aDeflection = Prs3d::GetDeflection (aCompound, aDrawer); + if (!BRepTools::Triangulation (aCompound, aDeflection)) + { + BRepMesh_IncrementalMesh anAlgo; + anAlgo.ChangeParameters().Deflection = aDeflection; + anAlgo.ChangeParameters().Angle = aDrawer->HLRAngle(); + anAlgo.ChangeParameters().InParallel = Standard_True; + anAlgo.SetShape (aCompound); + anAlgo.Perform(); + } + + // clear presentations + clearContext(); + + // create presentations + MapOfPrsForShapes aMapOfShapes; + XCAFPrs_Style aDefStyle; + aDefStyle.SetColorSurf (Quantity_NOC_GRAY65); + aDefStyle.SetColorCurv (Quantity_NOC_GRAY65); + for (Standard_Integer aLabIter = 1; aLabIter <= aLabels.Length(); ++aLabIter) + { + const TDF_Label& aLabel = aLabels.Value (aLabIter); + displayWithChildren (*aShapeTool, *aColorTool, aLabel, TopLoc_Location(), aDefStyle, "", aMapOfShapes); + } + + return true; +} + +// ======================================================================= +// function : displayWithChildren +// purpose : +// ======================================================================= +void OcctViewer::displayWithChildren (XCAFDoc_ShapeTool& theShapeTool, + XCAFDoc_ColorTool& theColorTool, + const TDF_Label& theLabel, + const TopLoc_Location& theParentTrsf, + const XCAFPrs_Style& theParentStyle, + const TCollection_AsciiString& theParentId, + MapOfPrsForShapes& theMapOfShapes) +{ + TDF_Label aRefLabel = theLabel; + if (theShapeTool.IsReference (theLabel)) + { + theShapeTool.GetReferredShape (theLabel, aRefLabel); + } + + TCollection_AsciiString anEntry; + TDF_Tool::Entry (theLabel, anEntry); + if (!theParentId.IsEmpty()) + { + anEntry = theParentId + "\n" + anEntry; + } + anEntry += "."; + + if (!theShapeTool.IsAssembly (aRefLabel)) + { + Handle(AIS_InteractiveObject) anAis; + if (!theMapOfShapes.Find (aRefLabel, anAis)) + { + anAis = new CafShapePrs (aRefLabel, theParentStyle, Graphic3d_NOM_SHINY_PLASTIC); + theMapOfShapes.Bind (aRefLabel, anAis); + } + + Handle(TCollection_HAsciiString) anId = new TCollection_HAsciiString (anEntry); + Handle(AIS_ConnectedInteractive) aConnected = new AIS_ConnectedInteractive(); + aConnected->Connect (anAis, theParentTrsf.Transformation()); + aConnected->SetOwner (anId); + aConnected->SetLocalTransformation (theParentTrsf.Transformation()); + aConnected->SetHilightMode(1); + myContext->Display (aConnected, Standard_False); + return; + } + + XCAFPrs_Style aDefStyle = theParentStyle; + Quantity_Color aColor; + if (theColorTool.GetColor (aRefLabel, XCAFDoc_ColorGen, aColor)) + { + aDefStyle.SetColorCurv (aColor); + aDefStyle.SetColorSurf (aColor); + } + if (theColorTool.GetColor (aRefLabel, XCAFDoc_ColorSurf, aColor)) + { + aDefStyle.SetColorSurf (aColor); + } + if (theColorTool.GetColor (aRefLabel, XCAFDoc_ColorCurv, aColor)) + { + aDefStyle.SetColorCurv (aColor); + } + + for (TDF_ChildIterator childIter (aRefLabel); childIter.More(); childIter.Next()) + { + TDF_Label aLabel = childIter.Value(); + if (!aLabel.IsNull() + && (aLabel.HasAttribute() || aLabel.HasChild())) + { + TopLoc_Location aTrsf = theParentTrsf * theShapeTool.GetLocation (aLabel); + displayWithChildren (theShapeTool, theColorTool, aLabel, aTrsf, aDefStyle, anEntry, theMapOfShapes); + } + } +} + +// ======================================================================= +// function : clearSession +// purpose : +// ======================================================================= +void OcctViewer::clearSession (const Handle(XSControl_WorkSession)& theSession) +{ + if (theSession.IsNull()) + { + return; + } + + Handle(Transfer_TransientProcess) aMapReader = theSession->TransferReader()->TransientProcess(); + if (!aMapReader.IsNull()) + { + aMapReader->Clear(); + } + + Handle(XSControl_TransferReader) aTransferReader = theSession->TransferReader(); + if (!aTransferReader.IsNull()) + { + aTransferReader->Clear(1); + } +} + +// ======================================================================= +// function : clearContext +// purpose : +// ======================================================================= +void OcctViewer::clearContext () +{ + if (!myContext.IsNull()) + { + myContext->ClearSelected(Standard_False); + myContext->RemoveAll(Standard_False); + } +} diff --git a/samples/ios/UIKitSample/UIKitSample/ViewController.h b/samples/ios/UIKitSample/UIKitSample/ViewController.h new file mode 100644 index 0000000000..a3b07d3798 --- /dev/null +++ b/samples/ios/UIKitSample/UIKitSample/ViewController.h @@ -0,0 +1,15 @@ +// +// ViewController.h +// UIKitSample +// +// Created by aan on 21/11/16. +// Copyright © 2016 aan. All rights reserved. +// + +#import + +@interface ViewController : UIViewController + + +@end + diff --git a/samples/ios/UIKitSample/UIKitSample/ViewController.m b/samples/ios/UIKitSample/UIKitSample/ViewController.m new file mode 100644 index 0000000000..01acdabf2d --- /dev/null +++ b/samples/ios/UIKitSample/UIKitSample/ViewController.m @@ -0,0 +1,30 @@ +// +// ViewController.m +// UIKitSample +// +// Created by aan on 21/11/16. +// Copyright © 2016 aan. All rights reserved. +// + +#import "ViewController.h" +#include "OcctViewer.h" + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. +} + + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + + +@end diff --git a/samples/ios/UIKitSample/UIKitSample/main.mm b/samples/ios/UIKitSample/UIKitSample/main.mm new file mode 100644 index 0000000000..85e2f4d84d --- /dev/null +++ b/samples/ios/UIKitSample/UIKitSample/main.mm @@ -0,0 +1,24 @@ +// Copyright (c) 2017 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#import + +#import "AppDelegate.h" + +int main(int argc, char * argv[]) +{ + @autoreleasepool + { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +}