@itwin/core-backend
Version:
iTwin.js backend components
25 lines • 1.24 kB
JavaScript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as fs from "fs";
import { Transform, } from "@itwin/core-geometry";
import { ColorDef, } from "@itwin/core-common";
import { IModelTestUtils } from "./IModelTestUtils";
export const brepData = JSON.parse(fs.readFileSync(IModelTestUtils.resolveAssetFile("brepdata1.json"), {
encoding: "utf8",
}));
export function createBRepDataProps(origin, angles) {
// This brep has a face symbology attribute attached to one face, make it green.
const faceSymb = [
{ color: ColorDef.blue.toJSON() }, // base symbology should match appearance...
{ color: ColorDef.green.toJSON(), transparency: 0.5 },
];
const brepProps = {
data: brepData.data,
faceSymbology: faceSymb,
transform: Transform.createOriginAndMatrix(origin, angles ? angles.toMatrix3d() : undefined).toJSON(),
};
return brepProps;
}
//# sourceMappingURL=GeometryTestUtil.js.map