Skip to content

Commit

Permalink
Conversion: supporting more curve types
Browse files Browse the repository at this point in the history
  • Loading branch information
nkallen committed Mar 3, 2022
1 parent e755e51 commit 2adc0dc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
11 changes: 11 additions & 0 deletions generate/api.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,16 @@ export default {
extends: "Curve3D",
dependencies: ["Curve3D.h"],
},
ReparamCurve3D: {
rawHeader: "cur_reparam_curve3d.h",
extends: "Curve3D",
dependencies: ["Curve3D.h"],
},
BridgeCurve3D: {
rawHeader: "cur_bridge3d.h",
extends: "Curve3D",
dependencies: ["Curve3D.h"],
},
OffsetCurve3D: {
rawHeader: "cur_offset_curve3d.h",
extends: "Curve3D",
Expand Down Expand Up @@ -1994,6 +2004,7 @@ export default {
{ signature: "MbResultType CreateContours(RPArray<MbCurve3D> & curves, double metricEps, RPArray<MbContour3D> & result, bool onlySmoothConnected = false, VERSION version = Math::DefaultMathVersion())", result: isReturn },
// "MbResultType RegularPolygon(const MbCartPoint3D & centre, const MbCartPoint3D & point, const MbVector3D & axisZ, size_t vertexCount, bool describe, MbCurve3D *& result )",
"MbResultType PlaneCurve(const MbPlacement3D &place, const MbCurve &curve, MbCurve3D *& result)",
"MbCurve3D * DuplicateCurve(const MbCurve3D & curve, VERSION version = Math::DefaultMathVersion())",
]
},
ActionRegion: {
Expand Down
6 changes: 6 additions & 0 deletions generate/manual/src/SpaceItemAddon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include "../include/Plane.h"
#include "../include/SurfaceIntersectionCurve.h"
#include "../include/OffsetCurve3D.h"
#include "../include/ReparamCurve3D.h"
#include "../include/BridgeCurve3D.h"
#include "../include/Assembly.h"
#include "../include/PlaneCurve.h"
#include "../include/SurfaceCurve.h"
Expand Down Expand Up @@ -110,6 +112,10 @@ Napi::Value cast(MbSpaceItem *_underlying, const Napi::CallbackInfo &info)
return SurfaceCurve::NewInstance(env, (MbSurfaceCurve *)(_underlying));
case st_OffsetCurve3D:
return OffsetCurve3D::NewInstance(env, (MbOffsetCurve3D *)(_underlying));
case st_ReparamCurve3D:
return ReparamCurve3D::NewInstance(env, (MbReparamCurve3D *)(_underlying));
case st_BridgeCurve3D:
return BridgeCurve3D::NewInstance(env, (MbBridgeCurve3D *)(_underlying));

// case st_WireFrame:
// return Item::NewInstance(env, dynamic_cast<MbWireFrame *>(_underlying));
Expand Down
4 changes: 2 additions & 2 deletions src/commands/modify_contour/ModifyContourFactory.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import c3d from '../../../build/Release/c3d.node';
import * as visual from '../../visual_model/VisualModel';
import { CornerAngle, inst2curve, normalizeCurve } from '../../util/Conversion';
import { GeometryFactory } from "../../command/GeometryFactory";
import { CornerAngle, inst2curve, normalizeCurve } from '../../util/Conversion';
import * as visual from '../../visual_model/VisualModel';
import { ContourFilletFactory, SegmentAngle } from "./ContourFilletFactory";
import { ModifyContourPointParams, MoveContourPointFactory } from "./ModifyContourPointFactory";
import { ModifyContourSegmentFactory, ModifyContourSegmentParams } from "./ModifyContourSegmentFactory";
Expand Down

0 comments on commit 2adc0dc

Please sign in to comment.