-
Notifications
You must be signed in to change notification settings - Fork 0
Home
zhangleio edited this page Sep 29, 2020
·
6 revisions
- CAD uses a right-handed coordinate system
- set main direction as Y to match paracraft custom
//! Identifies a coordinate system where its origin is Origin,
//! and its "main Direction" and "X Direction" coordinates
//! Y = 1.0, X = Z =0.0 and X direction coordinates Z = 1.0, X = Y = 0.0
Standard_EXPORT static const gp_Ax2& ZOX() ;
const gp_Ax2& gp::ZOX()
{
static gp_Ax2 gp_ZOX(gp_Pnt(0,0,0),gp_Dir(0,1,0),gp_Dir(0,0,1));
return gp_ZOX;
}
// code example
BRepPrimAPI_MakeCylinder cylinder(gp::ZOX(), radius, height, angle * M_PI / 180.0);
- Paracraft uses a left-handed coordinate system
- Create shapes in nplcad script
createNode("object0","#ffc658",true)
cylinder("union",0.5,1,"#ffc658")
move(0,0,3)
cube("union",1,"#ffc658")
move(3,0,0)
sphere("union",0.2,"#ffc658")
- Swap Y and Z vertex when exporting parax to show model in paracraft
- Swap Y and Z vertex when exporting stl to print 3D