ducjs
Version:
The duc 2D CAD file format is a cornerstone of our advanced design system, conceived to cater to professionals seeking precision and efficiency in their design work.
66 lines (65 loc) • 2.69 kB
JavaScript
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
import { FCFBetweenModifier } from '../duc/fcfbetween-modifier';
import { FCFProjectedZoneModifier } from '../duc/fcfprojected-zone-modifier';
export class FCFFrameModifiers {
constructor() {
this.bb = null;
this.bb_pos = 0;
}
__init(i, bb) {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsFCFFrameModifiers(bb, obj) {
return (obj || new FCFFrameModifiers()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsFCFFrameModifiers(bb, obj) {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new FCFFrameModifiers()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
allAround() {
const offset = this.bb.__offset(this.bb_pos, 4);
return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
}
allOver() {
const offset = this.bb.__offset(this.bb_pos, 6);
return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
}
continuousFeature() {
const offset = this.bb.__offset(this.bb_pos, 8);
return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
}
between(obj) {
const offset = this.bb.__offset(this.bb_pos, 10);
return offset ? (obj || new FCFBetweenModifier()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
}
projectedToleranceZone(obj) {
const offset = this.bb.__offset(this.bb_pos, 12);
return offset ? (obj || new FCFProjectedZoneModifier()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
}
static startFCFFrameModifiers(builder) {
builder.startObject(5);
}
static addAllAround(builder, allAround) {
builder.addFieldInt8(0, +allAround, +false);
}
static addAllOver(builder, allOver) {
builder.addFieldInt8(1, +allOver, +false);
}
static addContinuousFeature(builder, continuousFeature) {
builder.addFieldInt8(2, +continuousFeature, +false);
}
static addBetween(builder, betweenOffset) {
builder.addFieldOffset(3, betweenOffset, 0);
}
static addProjectedToleranceZone(builder, projectedToleranceZoneOffset) {
builder.addFieldOffset(4, projectedToleranceZoneOffset, 0);
}
static endFCFFrameModifiers(builder) {
const offset = builder.endObject();
return offset;
}
}