GetPlane from Reference of surface pattern

GetPlane from Reference of surface pattern

mphelt
Participant Participant
253 Views
3 Replies
Message 1 of 4

GetPlane from Reference of surface pattern

mphelt
Participant
Participant

I have a floor with a material that has a foreground surface pattern set to model parallel lines.

I can get a reference to each of this lines - their stable definition looks like:

- 3803a904-bec1-48c5-a331-3c5b35ca542a-000911b4:1:SURFACE/1

- 3803a904-bec1-48c5-a331-3c5b35ca542a-000911b4:1:SURFACE/2

- etc.

Top face reference of this floor is:

- 3803a904-bec1-48c5-a331-3c5b35ca542a-000911b4:1:SURFACE

 

What I try to obtain is Plane object.

The only way that I have found to do that is to use SketchPlane.Create(Document, Reference) and then SketchPlane.GetPlane().

This approach works, but I would like to avoid creating new elements if possible.

Does anyone know any other way to achieve that?

 

 

0 Likes
254 Views
3 Replies
Replies (3)
Message 2 of 4

RPTHOMAS108
Mentor
Mentor

How are you obtaining this reference?

 

It is basically a FillPatternElement containing FillGrids. A series of line segment arrays with origin, offset and direction?

 

What would be the purpose of obtaining a plane for each such line when they are all bound to the plane of a PlanarFace?

0 Likes
Message 3 of 4

mphelt
Participant
Participant
FillPatternElement is just a pair of Document and FillPattern, it doesn't
have association with the floor instance, does it?
I want to create structural framing instances based on the pattern lines. I
can select them using mouse, but those lines are references to the plane
object and not an element of any kind.
If I create SketchPlane based on this reference I'm able to get a plane
object. When I have a plane object then I am able to calculate intersection
with a top face and get a line. I can then use this line to create new
family instance.
The easiest way to obtain those stable representations of references is
through dimensions, but in the final solution I plan to generate those
stable representations.
0 Likes
Message 4 of 4

RPTHOMAS108
Mentor
Mentor

I understand but isn't there the following issue anyway:

When auto generating references how do you know how many you have (what will be the last number)? Perhaps you just increase until they are no longer obtained. They seem to go up in multiples of two (two surface references per line perhaps).

 

Have you considered using the CustomExporter with IExportContext2D instead? I note the following property:

CustomExporter.Export2DGeometricObjectsIncludingPatternLines

So if you can't recognise the references during the export process then at least you can change this setting for two exports to recognise the difference. You would isolate the slabs in the view to minimise the export.

 

Yes fill grids seems like a non-starter because it is assigned by material with no specific offset association to face. I would say you could work it out from face origin but I note that the pattern can be offset on the face but I'm not sure such an offset can be obtained via the API. The application of the material has a global offset but model fill patterns can be moved about per element.

 

0 Likes