Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
3D point
alberto_porras
Member Posts: 2 EDU
Hi,
I would like to know if it's possible to create a 3D point by coordinates.
Sometimes it is useful to create geometry from a specific point, thus I need a 3D point.
Thanks a lot in advance
I would like to know if it's possible to create a 3D point by coordinates.
Sometimes it is useful to create geometry from a specific point, thus I need a 3D point.
Thanks a lot in advance
0
Answers
-
Manually, you would need to create a plane that intersects either the X, Y, or Z coordinate of the desired point. Then you can place a sketch point on that plane and dimension it accordingly.
The more direct path would be to use featurescript. Here's an example script by @dave_cowden. It requires at least 2 points to be created, but it could be edited to allow an individual point.
https://cad.onshape.com/documents/502108ab33bd9af500b73c1a/w/68f73347f084d40c31271b24/e/5c9b644bfa74fd744d6bf626
0 -
Or, also with a custom feature, you could make a single point with one operation call, to opPoint, which takes (x,y,z) coordinates and make a point there.
https://cad.onshape.com/documents/05e61f73d88c30ebe9e3baf8/w/6e72e2b08afb63489da10bdf/e/a7fc29bda73abe3a05aec06bannotation { "Feature Type Name" : "3D Point" } export const threePoint = defineFeature(function(context is Context, id is Id, definition is map) precondition { annotation { "Name" : "X" } isLength(definition.x, LENGTH_BOUNDS); annotation { "Name" : "Y" } isLength(definition.y, LENGTH_BOUNDS); annotation { "Name" : "Z" } isLength(definition.z, LENGTH_BOUNDS); } { opPoint(context, id + "point", { "point" : vector(definition.x, definition.y, definition.z) }); });
Paul Chastell
TVP, Onshape Labs0 -
I'm surprised there isn't a general point FS out there that let's you create points from various inputs. Maybe my next project
3 -
I think I'll take a crack at a flexible point FS this week. Here are the input options that I can think of. Can anyone think of any others that would be useful?
- Intersection - intersects all queried geometries to get a point (e.g. 3 planes/surfaces, plane/surface & line, 2 planar lines)
- Projection - normal projection of point onto a plane/surface
- Along Curve - point located X% from either endpoint of a curve/edge
- XYZ - point located via coordinates
3 - Intersection - intersects all queried geometries to get a point (e.g. 3 planes/surfaces, plane/surface & line, 2 planar lines)
-
@mahirmahir said:- Along Curve - point located X% from either endpoint of a curve/edge
I would propose this option to work with multy-edge paths as well.
UPD: and possibly when you will work on Intersection option you can make a subfeature which would create intersection wire body from sets of faces, which is also often needed
1 -
Shouldn't be a problem. For multiple edges I'll just have to create a composite curve. As for the surface intersection, it looks like opBoolean does a good job of generating wire bodies. I'll just have to jump through a few hoops to feed it faces and planes as surface bodies.@mahir
I would propose this option to work with multy-edge paths as well.
UPD: and possibly when you will work on Intersection option you can make a subfeature which would create intersection wire body from sets of faces, which is also often needed0 -
@mahir
Here is a point FS: https://cad.onshape.com/documents/576d1e60c6cb90985345ac37
It supports projection, coordinates,and intersection0 -
@konstantin_shiriazdanovkonstantin_shiriazdanov said:UPD: and possibly when you will work on Intersection option you can make a subfeature which would create intersection wire body from sets of faces, which is also often needed
Try this feature: https://cad.onshape.com/documents/84d939daceef6a928b8abcba1 -
thanks @mbartlett21 will use it.
though I would change the position of match type selector after the boolean block like this:
0 -
That's great you got something going, but the link doesn't lead anywhere.mbartlett21 said:@mahir
Here is a point FS: https://cad.onshape.com/documents/576d1e60c6cb90985345ac37
It supports projection, coordinates,and intersection0 -
@mahir Sorry, i forgot to make it publicmahir said:
That's great you got something going, but the link doesn't lead anywhere.mbartlett21 said:@mahir
Here is a point FS: https://cad.onshape.com/documents/576d1e60c6cb90985345ac37
It supports projection, coordinates,and intersection
0 -
That's better. I see you started with my half finished FS. Not much time for messing with code with a new baby around ¯\_(ツ)_/¯1
-
@konstantin_shiriazdanovkonstantin_shiriazdanov said:thanks @mbartlett21 will use it.
though I would change the position of match type selector after the boolean block like this:
Try the new version 2.2, which adds localizedInFaces compatibility (With it set to true, it takes faces as input, which is cool)1 -
@mbartlett21 now add point along curve and you'll have all the targeted use cases
And don't forget to support both length and and ratio along curve. 0 -
I recently realized that Curve generator FS not only works with parametrized sketches but it actually creates a curve for any set of features that define a point, so having few more ways to define a point becomes more usefull.I would also request in this feature option to delete a point or mate connector0
-
2
-
@mbartlett21 delete multiples would be good, thank you. i need this because some features can create a lot of instances of point/MC's which are later unnececessary. but standart delete body feature can do nothing with itmbartlett21 said:I can also add it for multiple points if you want
0 -
@konstantin_shiriazdanov
Try this other feature of mine (Delete Part): https://cad.onshape.com/documents/33416d14c3930276fd8453fc1 -
Sure, why notmbartlett21 said:
0 -
@mahir
Multiple Points along path: DONE!1 -
Nice work. Glad you have so much time on your handsmbartlett21 said:@mahir
Multiple Points along path: DONE!
on opBoolean Plus, can you make it work for surfaces with internal boundaries the same way that Find Intersection does. Either that, or maybe allow Find Intersection to generate either a point OR curve(s)?0 -
Now I'm just nitpicking, but can you edit the multi coordinate workflow to be more like the multi along curve? For multi curve you have a variable array input query, but for multi coordinate the user is forced to enter a specially formatted string array. It would be nice if you could just enter X/Y/Z (or R/Th/Z, R/Th/Ph) into their own box and just click "add point" to add another set of inputs, just the along curve.
For that matter, the single/multi workflow seems to be pretty redundant for all the input types. For along and coordinate, if there is just one input, it's a single. If there is more than one, it's a multi. Same goes for projection. If one vertex is selected, it's a single. If more than one, it's a multi.
The only "single" input left is intersection. That is currently limited to single points. 3 surfaces with 2 points of intersection currently fails. If possible, try to account for multiple intersections. I would also add support for intersecting curves with surfaces and again try to account for possible multiple intersection points. All these fringe cases are what held up my progress when trying to develop this FS myself, but if you have the time then these additions would make for a lot of versatility
Last, but not least, maybe add an "equal split" option for along curve to create N points equally spaced along a curve, either with or without endpoints.
All right, my wish list is over
0 -
@mahir
I did the multi coordinate input like it is, so it would allow copy-pasting from excel or csv1 -
@mahirmahir said:
Nice work. Glad you have so much time on your handsmbartlett21 said:@mahir
Multiple Points along path: DONE!
on opBoolean Plus, can you make it work for surfaces with internal boundaries the same way that Find Intersection does. Either that, or maybe allow Find Intersection to generate either a point OR curve(s)?
What find intersection does is boolean the two surfaces without any holes, then uses evDistance to find the intersection, as that is the only way i know to get the intersection of a curve and a face.0 -
Right, that's what I figured. I'm just suggesting that opBoolean Plus have that same option to perform the intersection without any internal surface holes. Maybe use a checkbox to turn the option on/off. Ideally, opBoolean could take these internal boundaries into account and generate multiple curves from a surface intersection. But in the mean time, it should at least not fail.What find intersection does is boolean the two surfaces without any holes, then uses evDistance to find the intersection, as that is the only way i know to get the intersection of a curve and a face.0 -
@mbartlett21 - i just found this and really like it - thank you.
I notice however that the 'Project' option projects to point on the surface that is normal to the surface.
In my case, i just need the point directly under the point (normal to the sketch containing the seed point).
Do you have an updated version of this that offers this option?
Thank you
Philip Thomas - Onshape0 -
@philip_thomas, I’m on my phone, so I can’t check. But @mbartlett21’s Find Intersection FS, or possibly the Intersection option of 3D Point, when intersecting a line and a surface.
Edit: Nope, I lied. Both 3D Point and Find Intersection only take surfaces inputs. I guess the way around that would be to generate a couple surfaces whose intersection is your green line. Seems like a lot of work though for what seems like it should be a simple operation. @mbartlett21, maybe you can add a "projection direction" option that accepts a plane, planar surface, or linear edge/sketch/curve? Nothing selected = projected normal to target surface.1 -
@mahir i can do it like @paul_chastell 's extrude vertex if you want1
-
@mbartlett21, sure. But Extrude Vertex does a lot more than I don't think is necessary. Just a simple input for projection direction (plane/edge) would be nice.0
-
@mahir
@philip_thomas
Done!
It now has projection direction that can be specified (it uses opExtrude internally)1




