Reputation: 3
I want to create vertices on the edge of a solid model to apply loads. I started by creating datum points at the required locations along the edge, with the idea of using those points to partition the edge and apply loads on the resulting vertices:
sample_point = plateAssembly.DatumPointByEdgeParam(
edge=loading_edge, parameter=fraction_of_length
)
This is creating an entity that is visible in the GUI, but not as a vertex.
This was probably not the correct way to do that, since I am unable to get the coordinates of the created point (or rather do anything else with it), since the resulting feature object saved to sample_point
does not directly provide coordinates and is instead defined in relation to the edge that it was created from:
>>> print sample_point`
({'children': '', 'edgeParameter': 0.1, 'id': 8, 'isOutOfDate': False, 'name': 'Datum pt-4', 'parents': '2&', 'path': 'unknown', 'sketch': 'unknown'})`
This feels like it is something very basic, but I haven't managed to find anything about what I should do differently anywhere that I looked. I am an absolute beginner, so I am not sure if I am even looking in the right places to begin with.
I would really appreciate any help with this. Thank you in advance.
Upvotes: 0
Views: 1020
Reputation: 1049
From the DatumPointByEdgeParam
documentation:
This method creates a Feature object and a DatumPoint object along an edge at a selected distance from one end of the edge.
<...>
Return value
A Feature object.
So, as you said the variable sample_point
is not referencing the DatumPoint
object but the Feature object
To get the DatumPoint
object associated with the feature sample_point
you can simply use its id
:
sample_point_dp = plateAssembly.datums[sample_point.id]
Upvotes: 1