Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

XYZ Points From Plane to Datafile

Arbiter

New member
Hi Folks,
I am using Wildfire 4.0, and I am trying to get some
data from my model into Excel. What I have is a
truncated conical shape that I have an axis perpendicular
to the truncation. I have created a plane, offset by 5
degrees from my original datum using that axis as my
pivot point. I want to take 1000 points on the line I
generate by the intersection of that geometry and the
plane I made and output a delimited textfile I can import
into Excel. I need to do this every 5 degrees around the
circumference, a total of 36 times to get the entire set
of data I need. Is there a way I can program Wildfire
4.0 to do this, possibly using mapkeys? I am thinking I
would write some sort of "macro" and hotkeys sound right,
but I don't have much experience with them, and I don't
know how to make it increment automatically every 5
degrees. Thanks for your input!

-Chris
 
Hi Chris,
you could use a family table in which the instances have your five degrees distance. Create parameters of your xyz values and put them into the table.
Verify the family table and export it.
Reinhard
 
Reinhard,
What an interesting idea!! Do you think the family table
would handle 3000 + columns of data each (1000 pts XYZ for
each angle). I can see how that would work, any chance I
could make the family table so the families are in columns
instead of rows?

Any other ideas, possibly using an excel macro to drive the
operations through the VB API? Thanks for the advice so
far!

-Chris
 
Chris,
there may be a limit of column export to Excel, I heard of 256 columns.
But you can work in steps. You create your table with 250 columns, export your coordinates and then save it to file. You can edit this file (for your next 250 columns) and reimport it in your family table. Then you paste these fragments in Excel.
Good luck
Reinhard
 
if i understand it correctly:
i suggest to create all the required datum points on the sections using pattern, then insert an independent geometry in the model, move it to the top of the tree and include all the patterned points inside it. then you can delete all the other geometries inside the part. that leaves you with just the points. then save a copy of the part as a .stp file (set the option to include only datum points). opening the file using notepad, you'll see that it has all the points in this format:
#5=CARTESIAN_POINT('PNT19',(-1.516839955987E2,2.402438474909 E1,5.7E1));
also a few extraneous lines at the start and end which you can delete manually. save it as a txt file and import into excel as comma delimited txt. the first column will be of the form #5=CARTESIAN_POINT('PNT19', and the 3 others will include the coordinates. delete the first column and ctrl+f replace all ( and )); with blank. that leaves you with all the required data in 3 columns.

Edited by: solidworm
 
I played a little with family tables.
You can export your table as protab file and keep it for future use. If you import it it will overwrite your existing table.
But solidworms solution looks better.
Reinhard
 
Solidworm and ReinhardN, I'll have to take a look at the
proposals you mentioned! I think what I am hoping to do
is create some sort of "Macro" that will ask for a datum,
axis, and reference datum for the angle increment. Then,
the macro would tell Pro/E to take a section, create 1000
datum points along the line the section created, save the
points in a file, referencing a coordinate system with
the origin at the axis of rotation, then increment the
angle, and repeat the steps until the datum plane is
shifted 180 degrees. This would be used to characterize
a compound curve fuselage with oval cross-sections. I
plan to use this code to feed into an excel macro to
generate the G-code to make this using my hotwire
machine. Thanks for your help, any more suggestions?!

-Chris
 
yes, that would be great to work with VBA inside ProE. but i have not seen the VBA option in ProE yet. infact this operation can't be done without macros in other MCAD programs but in ProE this can be done almost effortlessly using patterns. just create an angled plane,select the plane and the surface, add an intersection feature, insert a point on intersection using ratio method. (say at .001), pattern the point using dimension method and select the .001 ration as the dimension, enter 1000 as umber of instances. now you have generated one section and it's points. you can group the angled plane,intersection curve and patterned points, then pattern the group around the 180 degree that you need . that leaves you with all the data point that you need.if you include the surfaces first in an independent geometry feature and delete all other features no rebuilds occur for those surfaces during these operations which will be faster. then follow the remaining steps.( also when exporting as stp you can specify in reference to which coordinate system you want to export)
sample.jpg


pointcloud.jpg

coords.jpg




Edited by: solidworm
 
Solidworm,
Now I understand! Thank you, I will try that as soon as
I get my Pro/E set up again (PC Power supply is shot and
needs to be replaced!). Thank you!

-Chris
 
Solidworm,
Is there a way to export the points as X-Y-Theta where
theta is the angle? I don't recall if Pro/E has
cylindrical coordinate systems available. Thanks so much
this discussion is really helpful!

-Chris
 
it can add a cylindrical coordinate system in mechanica mode, but when you export. it will report in Cartesian coordinates. also analysis>point seems to be able to get Cartesian coordinates of points only.
you should be able to transform Cartesian to cylindrical coordinates using a couple of formula in excel.

Edited by: solidworm
 
Chris,

What a great question.
smiley32.gif

The closest thing to VBA would be J-Link but I have not used that.
I don't think a macro would work as well as another of several methods I've tried. Although there is no way to define a CSYS as Cartesian Cylindrical or Spherical. This is only an option when importing .pts files for curve through points or offset points This can be achieved with an Analysis Feature.

There are several ways to do this but my final solution involves minimal effort and maximal return. One early concept was creating a table in Excel that can be used to extract feature parameters from the Analysis Feature which is quite convenient in WF4.

To extract feature parameters from a Pro/E Feature you can use &PARAMETER_NAME:fid_FEATURE_ID or
&PARAMETER_NAME:fid_FEATURE_NAME

This eventually is turned into the Feature ID whether or not you use the Feature Name.

As long as you create your points as a pattern you can reference pattern your Analysis feature and extract location parameters from the points.

X,Y,Z
R,Θ,Z
R,Φ,Θ

How did those Special Characters get entered?
Hold Alt [type on numpad] Release alt
Alt+[232] or &232 = Φ Phi
Alt+[233] or &233 = Θ Theta

In my first attempt I used 3 separate Analysis Measure Distance using planes as basis for offset and extracting a single parameter. 3 Patterns later I desided to look for a method to use Csys for Refernce and be able to generate 4 distances X Y Z and 3d distance.

Arbiter said:
Is there a way to export the points as X-Y-Theta where
theta is the angle? I don't recall if Pro/E has
cylindrical coordinate systems available.

-Chris

Param-Point_coord_cartesian.PNG

Param-Point_coord_cylindrical.PNG

Param-Point_coord_spherical.PNG


To be able to choose the type of coordinate values you want to use Select a Csys for The Projection Direction and the selection choice for CSYS type becomes available. Be Sure to choose Feature as Analysis Type in Analysis Tab and then you can use the Feature TAB to enter parameter names to use.

This can be brought into a Drawing as a table where it can be saved out that is an easy method but required a drawing file to achieve and would have to bring in a .CSV file which can be only 1 sheet. I've scrapped this method because it limits table length to 250 Rows similar problem to Family Table.

So the Longer but more efficient approach is to Save the model tree to a text file. Values are given in radians but Word can convert text to table with tabs or commas.

Since Angular Values are given in Radians
For Conversions I suggest adding a Part Parameter

RAD2DEG = 180/pi Locked

or you can do so in excel.

Sph: I'd suggest using R T P for Radius Theta and Phi
Cyl: I'd suggest using R T Z for Radius Theta and Z
Xyz: Just Use X Y Z

After creating your Feature Go into Tools > Relations > Feature
and add params for T(deg) P(deg)
Th = T * RAD2DEG
Ph = P * RAD2DEG

This has to be done before the pattern so all instances get the Parameters Th and Ph

Name&a mp;a mp;a mp;a mp;n bsp; | ID | R | Th=heta | Ph=Phi
Analysis_Feature AFID
Pattern_Feature PFID
Analisis_id_(PFID+1)
Analisis_id_(PFID+2)
etc.

I believe that Cylindrical and Spherical both work with Z in Vertical direction but I can double check it. I'm just wondering if it's possible to set Analysis to use Degrees. I thought there was a config option but don't remember it.

Well There you have it my method for getting the 3D Point Data in the system of your choosing.
point-data_ModelTree_export.PNG


Michael


Edited by: mjcole_ptc
 

Sponsor

Articles From 3DCAD World

Back
Top