Skip to content

Commit 6d6ba9c

Browse files
Allow exporting .stl to .jcad (#604)
* Allow exporting .stl to .jcad * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 792155d commit 6d6ba9c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

python/jupytercad_core/jupytercad_core/handlers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ def post(self):
2828
visible=True,
2929
shape="Part::Any",
3030
parameters=dict(
31-
Content=file_content, Type=str(Path(Path(file_name).suffix[1:]))
31+
Content=file_content,
32+
Type=str(Path(Path(file_name).suffix[1:])),
33+
Color="#808080",
34+
Placement=dict(Position=[0, 0, 0], Axis=[0, 0, 1], Angle=0),
3235
),
3336
)
3437
],

python/jupytercad_core/src/stlplugin/model.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export class JupyterCadStlDoc extends JupyterCadDoc {
6060
}
6161

6262
editable = false;
63+
toJcadEndpoint = 'jupytercad/export';
6364

6465
private _sourceObserver = (events: Y.YEvent<any>[]): void => {
6566
const changes: Array<{

0 commit comments

Comments
 (0)