First, the syntax of example you give cannot be interpreted by Ruby. At least not in a simple way. You should give a proper arrays, or hashes with Point3d (or coordinates) to be able to deal with.
If we draw the “polyline: points:”, as a curve and the “bulges:” as a cpoint it will be like this:
The #followme is an instance method of Sketchup::Face, therefor you will need a face then an edge or an array of edges on which the face follow along.
The polyline (curve) can be used as path to followme here, but I have no idea what face you want to use as a base and what the “bulges:” point (or coordinate) means here… Would you please elaborate!
Thanks dezmo. Yes, I know how to use #followme with a face and an array of edges. Now I get the data (polyline points and bulges) that exported from AutoCAD. My colleague drew arcs in AutoCAD, and exported them as the data with information for generating pipe. My task is to draw the pipe in Sketchup. I already draw the pipe face, but do not know how to get the path from the data.
If I can convert the data to arcs in Sketchup, add_arc would be a solution.
Also what units are the values you posted ?
SketchUp is designed to model buildings. It’s points have a 0.001" precision.
Also SketchUp’s API uses inches internally.
Yes, seconding what @dezmo said. I pointed you there so it could serve as an example of what is possible, and you could see the difference between an ACAD bulge and a SketchUp Arc.
We here usually ask that you at least make an attempt to solve your own codding challenges, but when you get stuck, come back and post what you have and explain what isn’t working for you.
Hi @Henry12 If you want to find the bulge you can use this formula bulge = Math.tan(( end_angle - start_angle)/4)
where start_angle and end_angle could found on the ArcCurve instance of an edge edge.curve.end_angle. In recreating the bulge take please take into consideration the direction of the bulge if it is left to right or right to left as it would produce the bulge the other way around (instead of pointing north it would point south)