How to calculate the transform of a new plane?

Programming and macros
User avatar
peterbrinkhuis
Posts: 7
Joined: Tue Mar 16, 2021 5:57 am
Answers: 0
x 4
x 11

How to calculate the transform of a new plane?

Unread post by peterbrinkhuis »

I am creating a reference plane after a user closes my PMP. I would like to know the transformation matrix of the plane before it’s being created because you cannot create the plane while the PMP is open.

I create the plane from an edge and a point:
Image

I know the start direction of the edge. This will become the normal of the plane. But how do I calculate the x-axis and y-axis before the plane is created? Which coordinate transformation will SolidWorks use?
Image
Bugzuki
Posts: 2
Joined: Tue Jun 15, 2021 4:05 pm
Answers: 0
x 1
x 1

Re: How to calculate the transform of a new plane?

Unread post by Bugzuki »

Not sure I understand your question, but here is an answer to what I think you are asking.

The plane in your images would be perpendicular to the edge. There would be no x and y axis dimensions for it's definition since it would go infinitely in both directions. The blue box you see in the second image is just a temporary outline of a section of the existing plane so you can visualize it. You can resize it however you want to without actually changing the plane in any way. Since it is an infinite entity the center is not necessarily centered on the edge or the point.
User avatar
Eddy Alleman
Posts: 50
Joined: Thu Apr 01, 2021 10:32 am
Answers: 8
Location: Belgium
x 80
x 89
Contact:

Re: How to calculate the transform of a new plane?

Unread post by Eddy Alleman »

This question was also asked on CadOverflow and was continued there:
https://www.cadoverflow.com/t/how-to-ca ... -plane/142

Basically the OP wants to create a workplane before creating a PMP and when the PMP is open transform it to the wanted location as chosen in the PMP.
The reason for this workaround is that Solidworks crashes when creating a workplane with an open PMP.

Eddy
Post Reply