-
Deleting points?
Can points be deleted (without nuking the entire sketch)? How? Particularly when removing, or trimming old lines (with the 'trim' tool), I'm often left with vestigial sketch points (from the 'point' tool) all over the place.
-
Importing a text file of x y z points
Hi I can't find an answer here but does anyone know if it's possible to import a txt file of x y z points. Does OnShape have a different file format or anything? Solidworks uses .sldcrv which is just a renamed .txt file in a certain format. I've attached the file I want to import. Any help would be greatly appreciated.…
-
rotate a vector and points
hello, how can I rotate vectors and points around a line with a given angle in FS? (to move them by the angle given) as opTransform only accepts bodies....
-
Points along a Curve
I am new to FeatureScript and am looking to create a (seemingly) simple script that places points along a curve, evenly spaced. Without getting into other spacing options, I would first like some guidance on how to do this given only a distance and a quantity, starting from the end. I tried to dissect the very nice Curve…
-
How can I find the intersection points from 2 circles in 2 sketches (w scripting)
Hello I want to find the intersection points of 2 circles I tried : var i = 1; var j = 2; // sketches Id var test_i = id + ("sketch_" ~ i); var test_j = id + ("sketch_" ~ j); // circles Id var circle_i = "circle_" ~ i; var circle_j = "circle_" ~ j; // circle edges var edges_i = sketchEntityQuery(test_i, EntityType.EDGE,…
-
Pierce constraint on featurescript
Hello I want to use the pierce constraint, on a 3D line and a sketch point, with the following code var newLineId = id + i + 1 + "line_";
opFitSpline(context, newLineId, { "points" : [sphereCenter, endPoint] }); var newPointLoopId = "point_" ~ (i + 1);
skPoint(sketch_loop, newPointLoopId, {"position" : vector(delta , delta…
-
evPlane parameters
Hello I want to create a plane normal to a line I tried: evPlane(context, { "point" : qCreatedBy(id + "apex", EntityType.VERTEX), "normalTo" : qCreatedBy( newId, EntityType.EDGE) }); but got the error Precondition of evPlane failed (arg.face is Query) How can I select the point and lines I created, to put into evPlane…
-
Point form percentage curve or distance from end
Is there a feature that allows you to place a point on a curve a specified percentage (or distance) from either end?
-
Dividing an edge in featurescript
I want to place a specified number of sketch points on even intervals along an edge in featurescript. I have done the slot tutorial but i need more understanding on these subjects:Determining the length of an edge in featurescript placing an sketchpoint on the edge in featurescript. It would be great i i was able to extend…
-
How do I select all vertices or points in a sketch?
I've imported .dwg linework into a sketch that has a number of lines I would like to apply the fix constraint to. However, I can't seem to select them by any method but clicking each one individually. Selecting with a bounding box and applying the fix constraint only affects the lines, not their vertices which still can be…
-
Best surface measuring strategy?
What is a good method for measuring points on a surface within featurescript? Is there a "create mesh" that I can apply to the surface first then measure those points? There must be more efficient way than what I am imagining: - Split the surface into a grid - Measure the split points from a plane
-
Import Points
Hello, does anyone know: is there any way to import point data into an existing Part Studio? I tried with STEP 214AutomotiveDesign which can hold point data, but no points came in. Best regards, Fredrik
-
skPoint unique ID's
In the following code: <br>for (var i = 0; i < 1/pointmultiplyer; i += 1)<br> {<br> <br> skPoint(theSketch,"point"+ toString(i), {<br> "position" : vector(curx, cury) <br> });<br> curx+=pointxadder;<br> cury+=pointyadder;<br> } It tells me "Can not add string and string" How else do I use a unique ID?
-
how does one convert a 2d point to a 3d point in featurescript?
I want to give a single point on a flat surface as the center point of concentric circles and I want to be able to select an arbitrary point on each circle. Then I want to convert those to 3D space so I can use them for various 360-degree operations. I can generate a 2D point in an arbitrary direction/distance from the…
-
Many points and skFitSpline
Hi I am automating a profile connecting many points with skFitSpline and the resulting spline misses most of the points specified. the snippet of code is as follows: skFitSpline(sketch1, "camberSpline", { "points" : pointsCamber }); where pointsCamber is an array of many vectors. any ideas as to how i could improve this…
-
Sketches and Points confusion
I'm trying to made a sketch with a bunch of dimensions. After a bunch of working on it and getting it to work. My sketch looks enclosed... but it does not appear shaded as a solid sketch. How can I weld the points? If I attempt to move my entire sketch by selecting all,, upon moving, lines start breaking apart showing me…