Skip to content

Commit b843518

Browse files
committed
Add export to FCstd option
1 parent 1f8093c commit b843518

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import freecad as fc
2+
3+
def convert_jcad_to_fcstd(jcad_dict: dict) -> 'fc.Document':
4+
"""
5+
Stub converter: create an empty FreeCAD document.
6+
Later, fill this in by iterating jcad_dict["objects"] and applying ops.
7+
"""
8+
doc = fc.app.newDocument("FromJCAD")
9+
# TODO: recreate primitives & boolean ops here
10+
return doc

src/plugins.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const FACTORY = 'Jupytercad Freecad Factory';
4040

4141
class JupyterCadFCstdDoc extends JupyterCadDoc {
4242
toJcadEndpoint = 'jupytercad_freecad/export-jcad';
43+
toFcstdEndpoint = 'jupytercad_freecad/export-fcstd';
4344
}
4445

4546
const activate = async (

0 commit comments

Comments
 (0)