[Tool] Curves on Mesh

[Tool] Curves on Mesh

weiser
Advocate Advocate
1,944 Views
9 Replies
Message 1 of 10

[Tool] Curves on Mesh

weiser
Advocate
Advocate

Hi there,

after posting the Tool for converting polyline-crossections to 2D-splines for building up CAD-geometry from mesh-models (https://forums.autodesk.com/t5/inventor-forum/tool-convert-polyline-to-spline-2d/m-p/8779347) here is another tool for re-engineering mesh-models which enables you to pick two points on the mesh and connect them with a "straight line on the mesh-surface".

NOTE: to use the tool you have to convert your STL-file with the Mesh-Enabler to a "CAD-triangulation".

You can choose starting point, endpoint and a maximum of three midpoints. The position of all selected points will be fixed while straighten the line between the points along the surface.

After calculating the kurve geometry a preview is shown where you can decide wether you want do keep the 3D-spline or not.

The process of straighten the line is done in an iterative way where the points are smoothed and projected onto the surface. Therefore the numeric parameters can be controlled by the user.

In the pictures the step of finding the shortes path along the mesh-nodes and straighten the line are shown for some lines on the bunny-mesh. Don't worry about the coloured mesh-triangles - this is done manually for giving a reference.

Futhermore I did some surface-modelling with the generated curves which shows the weakness of the method:

The rail-lines of the faces are missing for better surfaces-fitting of the cad-faces to the mesh-geometry. So you can imagine what's up next ....

Another disadvantage of the tool is, that it is relative time expensive. I think this could be optimized by using the algorithm within an plugin instead of VBA which is known to act rather slow ... or an implementation as an Inventor-feature by the autodesk coding team itself 😄

As the last time I hope that this will help some people out and maybe we can welcome that feature in Inventor in the future ....

Best Regards

Tool's GUI with the bunny-meshTool's GUI with the bunny-mesh  Importing pointsImporting pointsPath along the mesh-nodesPath along the mesh-nodes  Straightened lineStraightened line

Another pathAnother path  Another straightened lineAnother straightened lineSome lines on the mesh-geometrySome lines on the mesh-geometry   Boundary-faces based on the previously defined linesBoundary-faces based on the previously defined linesMissing railcurves causes a rather bad surface-fittingMissing railcurves causes a rather bad surface-fitting

Accepted solutions (2)
1,945 Views
9 Replies
Replies (9)
Message 2 of 10

weiser
Advocate
Advocate

Maybe someone is interested in another tool too ....

It is for building surfaces on mesh-surfaces:

https://forums.autodesk.com/t5/inventor-forum/tool-surfaces-on-mesh/td-p/8850954

Message 3 of 10

S_May
Mentor
Mentor

@weiser 

 

coole Lösung!!!

0 Likes
Message 4 of 10

weiser
Advocate
Advocate
Accepted solution

Tanks for the positive feedback!

Though this is just an information and not an unanswered question, I'll close it by accepting this as an answer 😉

Message 5 of 10

weiser
Advocate
Advocate
Accepted solution

He there,

I'm very sorry ... but I've found an error within my alogorithm for finding the right mesh-face to project the smoothed point to. So here is the update for that.

Another improvement is, that the found points are generated as Sketch-points, which are now linked to the splines instead of generating them again for the splines.

Regards

 

Message 6 of 10

S_May
Mentor
Mentor

Hi @weiser 

 

wie muss ich dein Tool installieren?

Message 7 of 10

Anonymous
Not applicable

Auf VBA-Editor klicken, FRM-Datei importieren, unter Formulare Doppeklick auf DialogMeshCurveFitting und dann auf Ausführen (Play) klicken. 

 

Aber ich bekomme die Punkte nicht ausgewählt. Es wird mir immer ein Fehler angezeigt. 

Message 8 of 10

S_May
Mentor
Mentor

Hi @Anonymous 

 

das Problem habe ich auch.

0 Likes
Message 9 of 10

Anonymous
Not applicable

Und wie hast du es gelöst? Er bringt die Fehlermeldung nachdem ich das Übernehmen von den Punkten bestätige. 

0 Likes
Message 10 of 10

weiser
Advocate
Advocate

Hi @Anonymous , @S_May 

 

ich habe das gerade bei mir noch einmal ausprobiert:

Ich habe eine mit MeshEnabler umgewandelte STL-Datei als Objekt, von dem ich die Netzpunkte anklicke und dann das die Generierung starte.

Ich habe allerdings noch ein kleines Makro dazugeschrieben, welches die UserForm aufruft, da man (soweit ich weiß) keine UserForm aus der Inventor-Ribbon-Leiste aufrufen kann. Außerdem besteht dann die Möglichkeit direkt einen oder mehr Punkte des Netzobjektes auszuwählen und das Programm erkennt das Netzobjekt und fragt, ob die Punkte alle übernommen werden sollen (in der Reihenfolge, wie diese ausgewählt wurden).

 

... jetzt beim Einfügen des Codes (vgl. unten) fällt mir auf, dass ggf. das Unterprogramm "MeshRaillinesFittingInitializeVariables" ggf. zur Ausführung fehlt. Vielleicht ist das schon die Lösung?

 

Falls noch Probleme sind und / oder Fragen, dann asst es mich einfach wissen.

 

Viele Grüße

 

Hier der Code:

 

Sub MeshRaillinesFitting()

' Initialisierung der Variablen
Call DialogMeshRaillinesFitting.MeshRaillinesFittingInitializeVariables

' Übernahme der aktuellen Auswahl
Call DialogMeshRaillinesFitting.ButtonMeshApplyR_Click

' Übernahme der Punkte aus der aktuellen Auswahl
Call DialogMeshRaillinesFitting.ButtonDefineCurve1_Click

' Aufruf des Dialogfensters
DialogMeshRaillinesFitting.Show

End Sub