All files / lib/services/geom surfaces.ts

100% Statements 5/5
100% Branches 0/0
100% Functions 3/3
100% Lines 5/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25                          3x 3x 3x 3x       1x        
import { OpenCascadeInstance, TopoDS_Face } from "../../../bitbybit-dev-occt/bitbybit-dev-occt";
import { OccHelper } from "../../occ-helper";
import * as Inputs from "../../api/inputs/inputs";
 
export class OCCTSurfaces {
 
    constructor(
        private readonly occ: OpenCascadeInstance,
        private readonly och: OccHelper
    ) {
    }
 
    cylindricalSurface(inputs: Inputs.OCCT.GeomCylindricalSurfaceDto) {
        const ax = this.och.entitiesService.gpAx3(inputs.center, inputs.direction);
        const res = new this.occ.Geom_CylindricalSurface_1(ax, inputs.radius);
        ax.delete();
        return res;
    }
 
    surfaceFromFace(inputs: Inputs.OCCT.ShapeDto<TopoDS_Face>) {
        return this.och.surfaceFromFace(inputs);
    }
 
}