Convert 3D volumes into single lines

Convert 3D volumes into single lines

Anonymous
Not applicable
2,740 Views
12 Replies
Message 1 of 13

Convert 3D volumes into single lines

Anonymous
Not applicable

Hi.

 

I need to convert information received in 3D format to unifilar within Autocad (2015 or 2017).

 

I get structures modeled in 3D blocks / volumes (I do not know the modeling software), all i get are the 3D volumes already converted to Autocad. Volumes without properties, as in the figures below.

 

The volumes are I-beams.

 

I need to turn everything into lines (unifilars). So, to do this I imagine to use the centroids of the extreme cross-sections of each solid to trace the lines between those centroids. I need to automate because there is too much information.

 

Do someone knows any command or tutorial ou code (LISP / VBA / etc) that can be used to do this automation?

 

I do not think Massprop is apropriate for the task, because I suppose I need the centroids of each of the extreme cross-sections to automatically draw the lines. But if there is any other way i´d appreciate the input!

 

Thank you very much in advance!

 

Pedro

Figura 1.jpgFigura 2.jpgFigura 3.jpg

 

0 Likes
2,741 Views
12 Replies
Replies (12)
Message 2 of 13

ActivistInvestor
Mentor
Mentor

 

If the objects are 3DSOLID entities, you can explode them into regions, and then explode the regions into edges (e.g., lines or other curves).

 

However that will result in some coincident edge geometry where surfaces intersect, and will require OVERKILL or some other tool to eliminate them.


@Anonymous wrote:

Hi.

 

I need to convert information received in 3D format to unifilar within Autocad (2015 or 2017).

 

I get structures modeled in 3D blocks / volumes (I do not know the modeling software), all i get are the 3D volumes already converted to Autocad. Volumes without properties, as in the figures below.

 

The volumes are I-beams.

 

I need to turn everything into lines (unifilars). So, to do this I imagine to use the centroids of the extreme cross-sections of each solid to trace the lines between those centroids. I need to automate because there is too much information.

 

Do someone knows any command or tutorial ou code (LISP / VBA / etc) that can be used to do this automation?

 

I do not think Massprop is apropriate for the task, because I suppose I need the centroids of each of the extreme cross-sections to automatically draw the lines. But if there is any other way i´d appreciate the input!

 

Thank you very much in advance!

 

Pedro

Figura 3.jpg

 


 

0 Likes
Message 3 of 13

Anonymous
Not applicable

Hi @ActivistInvestor

 

Thanks for the reply.

 

I think you proposal is a difficult loop.

 

If I explode the 3Dsolids I will have "n x 12" surfaces to handle (where "n" is the number of 3D solids with I-beam shape).

 

From these "n x 12" surfaces I only need 2 for each one of the 3D solids. These two surfaces are the cross sections of the 3D solids.

 

In short terms: if I can calculate the coordinates of the centroids of the two extreme cross sections for each 3D solid without exploding them, I can draw lines between these centroids and create an axis for each 3D solid, thus solving my problem.

 

But I don´t know how to calculate the centroids coordinates of extreme sections of each 3Dsolid or link them with a line for each 3DSolid.

 

Please see the sketch of what I need to do in the figure below.

 

Pedro

 

Figura 4.jpg

0 Likes
Message 4 of 13

ActivistInvestor
Mentor
Mentor

Exploding is actually the easiest solution to the problem because from Visual LISP you do not have the means to access the geometry of the solids, other than the centroid of the regions that you would still need to use EXPLODE to get, and then you would have to try to figure out which region produced by explode represents the profile of the extrusion.

 

If you really want to take an analytical approach, you will need to use ObjectARX (native C++ or managed), which has access to the BoundaryRepresentation library that's required to access the geometry of the solids, and there is still the problem of trying to recognize the profile geometry, which is not trivial.

 

Exploding the objects and then OVERKILLing them is not really difficult at all, and would require a relatively small amount of LISP scripting.

 

 

Message 5 of 13

dgorsman
Consultant
Consultant

Stupid question time: are these being generated by *any* kind of intelligent software?  Those normally include a center line, or work points as data, and some even have the option of exporting an analytical model.  Before getting too deep into buggering about with inferring data from 3D solids, I would recommend going back to the source and seeing what they can provide.

 

FYI, try not to use the term "I beam" with structural folk.  They'll quickly point out there is no such thing - there are standard flange and wide flange sections.  Smiley Happy

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


0 Likes
Message 6 of 13

Anonymous
Not applicable

What can i say?

 

I must say that are smart software operated by stupid users. And I have no command over their work. I receive the 3D model 'as is' and have to accept them "as is".

 

@dgorsma: "I would recommend going back to the source and seeing what they can provide".

 

Believe me: I´ve tried this too many times. Now I´m facing other options to solve the situation and reduce my man-hours labbouring over their sh****. No other way out.

 

Nevertheless, Autocad is only an interface to me. It´s not THE software nor the focus of my work. So, now I need some help to do this.

 

If someone can provide me some guidance it would be of great help. Only few trick to get me starting, so I´ll put the stones to roll.

 

Thanks

Pedro

0 Likes
Message 7 of 13

Kent1Cooper
Consultant
Consultant

I can imagine a way to do it with any beam/column that runs in any orthogonal direction, by way of its bounding box.  For example, a vertical column's center-line would be calculable from the XY components of midway between its bounding box corners, combined with the Z coordinate of each corner.  But diagonal  beams are beyond me in terms of any kind of automation -- the entity data about 3D Solids is utterly inscrutable, and I've never seen a way to interpret it meaningfully to get any information you could use from it.  But you could manually draw a Line along an outer-corner edge of a beam using ENDpoint Osnap, and Move it to the midway-between-two-points location between one end of it and opposite corner of the same end of the beam.  I don't see a way to automate that, though.

Kent Cooper, AIA
Message 8 of 13

ActivistInvestor
Mentor
Mentor

By analyzing the geometry produced by exploding a single occurrence of a structural member, you can infer from the geometric extents of the regions produced if a region represents the extrusion profile (provided that you can assume there are no members whose length is shorter than their height or width).

 

So the approach would be to explode each piece (which produces regions) and use the largest dimension of each region's geometric extents to determine which of them represents the profile (the one with the smallest geometric extents in any dimension). Then you can get the centroid of that profile region, and use any line representing an extruded edge (by exploding the other, non-profile regions) to determine the extrusion vector/direction.

 

That would essentially be reverse-engineering the extrusion of a profile along a vector, and the solution would be somewhat less complicated than I originally suggested.

 

 

Message 9 of 13

stevor
Collaborator
Collaborator

The shortest path to your 'central lines'

is some autolisp code to find the furthest pair of centroids.

 

Like 'Activi' started: explode to REGIONs, get centroids,

find furthest pair, all by lsp bcode, and the necessary parts

are on the web.

Should work for the common ACIS 3DSOLID shapes,

unless the 'beam' is too short, them many more lines of code.

S
Message 10 of 13

SEANT61
Advisor
Advisor

Most of the suggestions already presented, as well as the one I’m about to make, work well with regular, unmodified beams.  As soon as the beam geometry has cut ends or mid-span Booleans, the process becomes more problematic.

 

If we can assume the ends and the spans are clean, and that the extrusion direction is the longest dimension, then the vector associated with the Principal Moment of the smallest value aligns with the extrusion direction.  For instance:  the K Principal Moment in you MASSPROP example is the smallest (4.2473E+12 is actually the smallest despite that moments use of exponential notation).  The direction vector associated with that is 0,0,1.

 

Try MASSPROP with one of the angled beams to see the relationship.

 

If the beam were EXPLODEd, the two Regions with Normals parallel to that direction vector would be the two extreme end sections.


************************************************************
May your cursor always snap to the location intended.
Message 11 of 13

SEANT61
Advisor
Advisor

@SEANT61 wrote:

. . . .  The direction vector associated with that is 0,0,1. . . . .

 

 


aka PrincipalDirections


************************************************************
May your cursor always snap to the location intended.
0 Likes
Message 12 of 13

ActivistInvestor
Mentor
Mentor

@SEANT61 wrote:

Most of the suggestions already presented, as well as the one I’m about to make, work well with regular, unmodified beams.  As soon as the beam geometry has cut ends or mid-span Booleans, the process becomes more problematic.

 

If we can assume the ends and the spans are clean, and that the extrusion direction is the longest dimension, then the vector associated with the Principal Moment of the smallest value aligns with the extrusion direction.  For instance:  the K Principal Moment in you MASSPROP example is the smallest (4.2473E+12 is actually the smallest despite that moments use of exponential notation).  The direction vector associated with that is 0,0,1.

 

Try MASSPROP with one of the angled beams to see the relationship.

 

If the beam were EXPLODEd, the two Regions with Normals parallel to that direction vector would be the two extreme end sections.


Actually, it's even easier than that, and doesn't depend on whether the spans are clean or not, because the normal of the profile region defines the extrusion direction (or the vector between the centroids of the start and end profile regions), take your pick.

 

The only requirement is that the ends of the sections are clean and without cutouts, but in that case a cross-section can be cut through the member to get at least one extrusion profile, but determining the start and end of the extrusion with ends that have cutouts is a bit more more involved.

0 Likes
Message 13 of 13

SEANT61
Advisor
Advisor

@ActivistInvestor wrote:

 

The only requirement is that the ends of the sections are clean and without cutouts, but in that case a cross-section can be cut through the member to get at least one extrusion profile, but determining the start and end of the extrusion with ends that have cutouts is a bit more more involved.


Indeed, it's a Rabbit Hole.  If there is no guarantee for either end then getting a valid vector for a perpendicular plane cross-section becomes rather difficult.  Angle cut ends will not have the correct Normal.  It may turn out that those angular Region Centroids can act as anchors for vector retrieval, but not if an end has been notched. . . .  

 

I very much agree that the more variable the possible condition of the beams, the more involved the situation becomes. 

 

If the OP's post processing requirements offer some tolerance, the Principal Direction method might mitigate some minor modifications.


************************************************************
May your cursor always snap to the location intended.
0 Likes