Cancel
Showing results for 
Search instead for 
Did you mean: 

Question about creating a facet

Siemens Legend Siemens Legend
Siemens Legend

Question:

 

I’d like to create a facet, means fill some closed polyline with a 0mm thick surface.

I would be great if the polyline does not have to be planar. But if that’s a must, I could create two triangles.

 

Is that possible?

I have no idea what method of ITxGeometryCreation comes near to this requirement.

Plane? Slot?

(what’s a slot anyway? It’s not nice that SDK-help always tells how to use it, but never what is)

 

Would you have a hint (and maybe even a snippet) for me?

 

Answer:

 

First about the slot – it is a rectangle with two semicircles at both ends, and it is a closed curve. When you create it you need to define length and width – length is the yellow line and the width is the green one(diameter of the semicircle).

Regarding the facet that you would like to create, there is no API method that can create an object with 0mm thickness. You can use the CreateSolidByExtrude method to extrude a curve or polyline with a small thickness.

Example:

Create a command that executes the following code:

ITxGeometryCreation selComponent = TxApplication.ActiveSelection.GetAllItems()[0] as ITxGeometryCreation;

            if(selComponent != null)

            {

                Tecnomatix.Engineering.DataTypes.TxSlotCreationData slotData = new Tecnomatix.Engineering.DataTypes.TxSlotCreationData("test", 200, 200);

                ITx1Dimensional slot = selComponent.CreateSlot(slotData);

 

                Tecnomatix.Engineering.DataTypes.TxRectangleCreationData rectData = new Tecnomatix.Engineering.DataTypes.TxRectangleCreationData("rect", 200, 200);

                ITx1Dimensional rect = selComponent.CreateRectangle(rectData);

                

                TxSolid solidBySlot = selComponent.CreateSolidByExtrude(new Tecnomatix.Engineering.DataTypes.TxSolidByExtrudeCreationData("solidBySlot", slot, new TxVector(0,0,1), 0.0001));

                TxSolid solidByRect = selComponent.CreateSolidByExtrude(new Tecnomatix.Engineering.DataTypes.TxSolidByExtrudeCreationData("solidByRect", rect, new TxVector(0, 0, 1), 0.0001));

            }

 

In PS select a component that is open for modeling and execute your command, you will get two solids with thickness 0.0001.

 

If this does not help, please share more about your idea, why you need that facet and we can search for an alternative solution.

1 REPLY 1

Re: Question about creating a facet

Experimenter
Experimenter

Hi, I am also looking for a way to create a facet. I found the TxSurface class and the Approximation for meshes. Not sure what I can use, yet. Thank you for your solution btw. 

 

What I need to do is also to apply color, texture or color with gradient on this surface. It is about painting after all. Is there a way to do that using the .NET API or any other way?