Get the App
SLTechnology News&Howtos  ›  Development  › 

How to draw splines with CAD parameters

Shulou Source: shulou.com Published: 2022-06-02 10:46:22 10月03日 Update

In this issue, the editor will bring you about how to draw splines for CAD parameters. The article is rich in content and analyzes and describes for you from a professional point of view. I hope you can get something after reading this article.

In CAD design, you need to draw splines, and you can set properties such as spline weight and color.

The function description is mainly used:

_ DMxDrawX::PathLineTo

Moves the next point of the path to the specified location. The details are as follows:

Parameter indicates the X coordinate of the DOUBLE dX point, the Y coordinate of the DOUBLE dY point _ DMxDrawX::DrawPathToSpline

Turn the path into a spline.

Code description for implementation in js:

Function DrawSpline () {/ / change the color back to black and white mxOcx.DrawCADColorIndex = 0; / change the linetype to solid mxOcx.LineType = ""; / / set the lineweight 4 mxOcx.LineWidth = 0; / / create a layer named "SplinelineLayer" mxOcx.AddLayer ("SplinelineLayer"); / / set the current layer to "SplinelineLayer" mxOcx.LayerName = "SplinelineLayer" / / "- -" / / define the start point of a path mxOcx.PathMoveTo (0, 1700) with a spline drawing a solid line; / / the next point of the path mxOcx.PathLineTo (1700) / / the next point of the path mxOcx.PathLineTo (1800); / / the next point of the path mxOcx.PathLineTo (0, 1800); / / synthesize the path into a sample line mxOcx.DrawPathToSpline () / / "- -" / / use the spline mxOcx.AddLinetype to draw a dashed line ("MySplineType", "30 MySplineType"); mxOcx.LineType = ("MySplineType"); mxOcx.DrawCADColor = 255; mxOcx.LineWidth = 5 / / define the start point of a path mxOcx.PathMoveTo (200,200); / / the next point of the path mxOcx.PathLineTo (1700); / / the next point of the path mxOcx.PathLineTo (1800); / / the next point of the path mxOcx.PathLineTo (1700); mxOcx.DrawPathToSpline (); mxOcx.ZoomAll (); mxOcx.UpdateDisplay () } above is how to draw splines with the CAD parameters shared by the editor. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Tags: Paths parameters a sample content coordinates solid lines colors analysis professional small and medium code location rich content functions that is properties articles more users white Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Xiaomi Redmi MariaDB Linux