Tutorials PartCraft help Walkthroughs
Move parts to and from other part modelers
Send a part to another part modeler as a macro that rebuilds it with a live feature tree, or as a named STEP, and open the feature list another modeler wrote out with the CadCraft export macro.
Written for PartCraft 0.3. The same help is inside the app: press F1.
PartCraft exchanges parts with SolidWorks both ways, without a file format nobody else can read:
- Out: a macro (
.swb, plain text) that SolidWorks runs to build the part itself, feature by feature, with its sketches, relations, dimensions, global variables and equations. You get a native part with a live feature tree, not a dead solid. A STEP of the same part goes beside it. - Back: a macro you run inside SolidWorks writes the part's features and equations to a
.cadcraft-sw.jsonfile, and PartCraft's Open rebuilds it.
PartCraft cannot write a .sldprt file: that format is closed. The macro is the way to get a native part.
Send a part as a macro
- Open the part. Let the exact kernel finish loading (the status bar chip says "Exact kernel").
- Choose Export, then Macro for SolidWorks (.swb). PartCraft rebuilds the part once per feature (to find faces and edges by a point on them, and to know the body after every step) and downloads
<part>.swb. - A dialog says how many features, global variables and equations the macro builds, and lists anything it leaves out. Choose Download the STEP too to also get
<part>.step. - In SolidWorks, choose Tools > Macro > Run, pick the
.swbfile and wait. It makes a new part from your default part template, sets millimetres and builds every feature. - At the end a message says how many steps were done, how many failed and how many matched PartCraft's body. The full log,
<part> macro log.txt, is written next to the macro.
What the macro builds:
| PartCraft | In the new part |
|---|---|
| Sketch on the Front, Top or Right plane | A sketch on that plane, with its lines, arcs, circles, points, relations and dimensions (named as in PartCraft, such as k7) |
| Sketch on a face | A sketch on the same face, picked by a point on it |
| Sketch on a fixed plane | A reference plane through three points, and the sketch on it |
| Extrude, cut (blind, through all, mid-plane, two directions, taper) | Boss-extrude or cut-extrude |
| Revolve, revolved cut | Revolve about the same centerline |
| Hole (simple, counterbore, countersink, tapped) | One or two cuts with their own sketches (a tapped hole is its tap drill; no thread) |
| Linear and circular pattern, mirror | Linear pattern, circular pattern, mirror (features or the body) |
| Fillet, chamfer, shell | Fillet, chamfer and shell on the same edges and faces, picked by points |
| Parameters and equations | Global variables and equations on the renamed dimensions |
| Suppressed features, the rollback bar | Suppressed the same way; the rollback bar in the same place |
After each solid feature the macro compares the body's volume and size with PartCraft's. When they differ, it turns that feature's direction round once and checks again; if that is no better it turns it back and writes "Check" in the log.
What is left out
The dialog and the top of the macro list everything not carried over, with the reason. Today that is: imported solids (insert the STEP instead), sweeps, lofts, drafts, reference axes and points, "up to" end conditions, extruding only some contours, and anything that depends on them. Splines become curves through their points. Without the exact kernel, sketches on faces and the features that pick edges or faces are left out too.
Send a named STEP
Choose Export, then STEP for SolidWorks (named, AP214). The file carries the part's name, millimetres and the part colour, and stands Y up, the way SolidWorks shows parts (the plain STEP AP214 (exact solid) export stands Z up). Letters with accents lose them in the name, and other characters outside plain ASCII become _.
Bring a part back
- Choose File > Export > Export macro to bring parts back (.swb) to download
CadCraftExport.swb, and put it next to your parts. - In SolidWorks, open the part, choose Tools > Macro > Run and pick
CadCraftExport.swb. It writes<part>.cadcraft-sw.jsonnext to the part and changes nothing in it. - In PartCraft, choose Open and pick that file, or drop it on the 3D view.
- PartCraft rebuilds the part feature by feature with the exact kernel and shows what it did: for example "5 of 5 features carried over from SolidWorks (Flange.SLDPRT)", each feature it could not carry ("Not carried over: Sweep1 (Sweep).") and whether the volume matches the one SolidWorks wrote.
- Save it as a PartCraft part with Save.
Sketches land on a base plane when they sit on one, on the matching flat face of the part when there is one (so they follow later edits), and on a fixed plane otherwise. Edges and faces of fillets, chamfers and shells are found from points and kept as named references. Global variables become parameters (names with spaces get underscores: "Bolt count" becomes Bolt_count) and equations become equations on the same dimensions. Nothing is guessed: what has no counterpart is listed.
The CadCraft drafting app opens the same file and takes its sketches.