Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bitbybit-occt

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitbybit-occt - npm Package Compare versions

Comparing version 0.10.4 to 0.10.5

56

lib/api/inputs/occ-inputs.d.ts

@@ -353,4 +353,4 @@ import { Base } from "./inputs";

* Shift half step every nth U row
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity

@@ -362,4 +362,4 @@ * @step 1

* Offset for shift half step every nth U row
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity

@@ -371,4 +371,4 @@ * @step 1

* Removes start edge points on U
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity

@@ -380,4 +380,4 @@ * @step 1

* Offset for remove start edge points on U
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity

@@ -389,4 +389,4 @@ * @step 1

* Removes end edge points on U
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity

@@ -398,4 +398,4 @@ * @step 1

* Offset for remove end edge points on U
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity

@@ -407,4 +407,4 @@ * @step 1

* Shift half step every nth V row
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity

@@ -416,4 +416,4 @@ * @step 1

* Offset for shift half step every nth V row
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity

@@ -425,4 +425,4 @@ * @step 1

* Removes start edge points on V
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity

@@ -434,4 +434,4 @@ * @step 1

* Offset for remove start edge points on V
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity

@@ -443,4 +443,4 @@ * @step 1

* Removes end edge points on V
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity

@@ -452,4 +452,4 @@ * @step 1

* Offset for remove end edge points on V
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity

@@ -558,2 +558,10 @@ * @step 1

}
class PolylineDto {
constructor(points?: Base.Point3[]);
/**
* Points points
* @default undefined
*/
points: Base.Point3[];
}
class SquareDto {

@@ -560,0 +568,0 @@ /**

@@ -247,96 +247,96 @@ // tslint:disable-next-line: no-namespace

* Shift half step every nth U row
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.shiftHalfStepNthU = 1;
this.shiftHalfStepNthU = 0;
/**
* Offset for shift half step every nth U row
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.shiftHalfStepUOffsetN = 1;
this.shiftHalfStepUOffsetN = 0;
/**
* Removes start edge points on U
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.removeStartEdgeNthU = 1;
this.removeStartEdgeNthU = 0;
/**
* Offset for remove start edge points on U
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.removeStartEdgeUOffsetN = 1;
this.removeStartEdgeUOffsetN = 0;
/**
* Removes end edge points on U
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.removeEndEdgeNthU = 1;
this.removeEndEdgeNthU = 0;
/**
* Offset for remove end edge points on U
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.removeEndEdgeUOffsetN = 1;
this.removeEndEdgeUOffsetN = 0;
/**
* Shift half step every nth V row
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.shiftHalfStepNthV = 1;
this.shiftHalfStepNthV = 0;
/**
* Offset for shift half step every nth V row
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.shiftHalfStepVOffsetN = 1;
this.shiftHalfStepVOffsetN = 0;
/**
* Removes start edge points on V
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.removeStartEdgeNthV = 1;
this.removeStartEdgeNthV = 0;
/**
* Offset for remove start edge points on V
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.removeStartEdgeVOffsetN = 1;
this.removeStartEdgeVOffsetN = 0;
/**
* Removes end edge points on V
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.removeEndEdgeNthV = 1;
this.removeEndEdgeNthV = 0;
/**
* Offset for remove end edge points on V
* @default 1
* @minimum 1
* @default 0
* @minimum 0
* @maximum Infinity
* @step 1
*/
this.removeEndEdgeVOffsetN = 1;
this.removeEndEdgeVOffsetN = 0;
this.shape = shape;

@@ -436,2 +436,8 @@ }

OCCT.PolygonDto = PolygonDto;
class PolylineDto {
constructor(points) {
this.points = points;
}
}
OCCT.PolylineDto = PolylineDto;
class SquareDto {

@@ -438,0 +444,0 @@ constructor() {

@@ -97,2 +97,3 @@ import { Adaptor3d_Curve, BRepAdaptor_CompCurve_2, Geom2d_Curve, TopoDS_Shell, TopoDS_Solid, Geom_Circle, Geom_Curve, Geom_Ellipse, Geom_Surface, gp_Ax1, gp_Ax2, gp_Ax22d_2, gp_Ax2d_2, gp_Ax3, gp_Dir2d_4, gp_Dir_4, gp_Pln_3, gp_Pnt2d_3, gp_Pnt_3, gp_Vec2d_4, gp_Vec_4, gp_XYZ_2, Handle_Geom_Curve, OpenCascadeInstance, TopoDS_Compound, TopoDS_Edge, TopoDS_Face, TopoDS_Shape, TopoDS_Vertex, TopoDS_Wire } from '../bitbybit-dev-occt/bitbybit-dev-occt';

createPolygonWire(inputs: Inputs.OCCT.PolygonDto): TopoDS_Wire;
createPolylineWire(inputs: Inputs.OCCT.PolylineDto): TopoDS_Wire;
private makeWireBetweenTwoPoints;

@@ -99,0 +100,0 @@ divideEdgeByParamsToPoints(inputs: Inputs.OCCT.DivideDto<TopoDS_Edge>): Inputs.Base.Point3[];

@@ -595,2 +595,18 @@ export var typeSpecificityEnum;

}
createPolylineWire(inputs) {
const gpPoints = [];
for (let ind = 0; ind < inputs.points.length; ind++) {
gpPoints.push(this.gpPnt(inputs.points[ind]));
}
const wireMaker = new this.occ.BRepBuilderAPI_MakeWire_1();
for (let ind = 0; ind < inputs.points.length - 1; ind++) {
const pt1 = gpPoints[ind];
const pt2 = gpPoints[ind + 1];
const innerWire = this.makeWireBetweenTwoPoints(pt1, pt2);
wireMaker.Add_2(innerWire);
}
const wire = wireMaker.Wire();
wireMaker.delete();
return wire;
}
makeWireBetweenTwoPoints(pt1, pt2) {

@@ -597,0 +613,0 @@ const seg = new this.occ.GC_MakeSegment_1(pt1, pt2);

@@ -53,3 +53,5 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

expect(solid.getSolidVolume({ shape: box })).toBeCloseTo(12);
expect(center).toEqual([0.5, 0, 0]);
expect(center[0]).toBeCloseTo(0.5);
expect(center[1]).toBeCloseTo(0);
expect(center[2]).toBeCloseTo(0);
box.delete();

@@ -56,0 +58,0 @@ }));

@@ -9,2 +9,3 @@ import { TopoDS_Face, OpenCascadeInstance, TopoDS_Wire, TopoDS_Shape, TopoDS_Edge } from '../../../bitbybit-dev-occt/bitbybit-dev-occt';

createPolygonWire(inputs: Inputs.OCCT.PolygonDto): any;
createPolylineWire(inputs: Inputs.OCCT.PolylineDto): any;
combineEdgesAndWiresIntoAWire(inputs: Inputs.OCCT.ShapesDto<TopoDS_Wire | TopoDS_Edge>): any;

@@ -11,0 +12,0 @@ addEdgesAndWiresToWire(inputs: Inputs.OCCT.ShapeShapesDto<TopoDS_Wire, TopoDS_Wire | TopoDS_Edge>): any;

@@ -10,2 +10,5 @@ import { shapeTypeEnum, typeSpecificityEnum } from '../../occ-helper';

}
createPolylineWire(inputs) {
return this.och.createPolylineWire(inputs);
}
combineEdgesAndWiresIntoAWire(inputs) {

@@ -12,0 +15,0 @@ return this.och.combineEdgesAndWiresIntoAWire(inputs);

@@ -86,2 +86,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

}));
it('should create a polyline wire', () => __awaiter(void 0, void 0, void 0, function* () {
const w = wire.createPolylineWire({ points: [[0, 0, 0], [1, 1, 0], [0, 2, 5]] });
const length = wire.getWireLength({ shape: w });
expect(length).toBe(6.610365985079727);
w.delete();
}));
it('should create a star wire', () => __awaiter(void 0, void 0, void 0, function* () {

@@ -88,0 +94,0 @@ const w = wire.createStarWire({ numRays: 9, outerRadius: 5, innerRadius: 2, center: [0, 0, 0], direction: [0, 0, 1], half: false });

{
"name": "bitbybit-occt",
"version": "0.10.4",
"version": "0.10.5",
"description": "Bit By Bit Developers CAD algorithms using OpenCascade Technology kernel. Run in Node and in Browser.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc