constructionPlane.displayBounds issue

constructionPlane.displayBounds issue

jean-marc_langlois
Contributor Contributor
481 Views
1 Reply
Message 1 of 2

constructionPlane.displayBounds issue

jean-marc_langlois
Contributor
Contributor

Hi all,

 

I'm trying to create a construction plane using the API, and I am stumbling across a strange behavior...

 

Here is what I do:

1) Create an adsk.core.Plane instance, using the "createUsingDirections" method

2) I then use that plane as input for the constructionPlaneInput.setByPlane method

3) Eventually the construction plane is created, with the expected origin and orientation.

 

Once this is done, I want to resize it by changing its display bounds 

 

The strange behavior I am seeing is that if the construction plane is parallel to either the XY, XZ or YZ planes, changing the display bounds works perfectly - the width and height of the plane is set to the expected value.

 

On the other hand, for construction planes that are neither parallel to either the XY, XZ or YZ planes, changing the display bounds set the width to the expected value, but not the height, which I find very odd.

 

Does anyone know what is going on here ?

 

Attached is a zipped python sample that reproduces both behaviors.

 

Thanks in advance

 

Jean-Marc Langlois

0 Likes
482 Views
1 Reply
Reply (1)
Message 2 of 2

jean-marc_langlois
Contributor
Contributor

I just noticed that in my attached python scripty, the most important statement was commented out :

 

boundingBox = adsk.core.BoundingBox2D.create( minPoint, maxPoint )

#constructionPlane.displayBounds = boundingBox

baseFeature.finishEdit()

 

Obviously it needs to be uncommented !

0 Likes