- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
As of now, in my code base, I am creating construction planes with the planeInput->setByDistanceOnPath method which allows me to get the construction plane centered on the origin, and corresponds to the starting point of the line entity passed as the first argument of the method. This greatly facilitates my next step where I set the bounding box of the construction plane like a rectangle. The first file attachment illustrates the result. (Plane_setByDistanceOnPath.png)
Now, I would like to know if there is a way to obtain the same result (construction plane centered on origin) with another method I am trying that would eliminate the need to create a sketch line. This method is :
planeInput = planes.createInput()
planeInput.targetBaseOrFormFeature = baseFeat
origin = adsk.core.Point3D.create(0, 0, 0)
xAxis = adsk.core.Vector3D.create(1, 0, 0)
yAxis = adsk.core.Vector3D.create(0, 1, 0)
plane_test = adsk.core.Plane.createUsingDirections(origin, xAxis, yAxis)
planeInput.setByPlane(plane_test)
planes.add(planeInput)
The problem is I am not getting the construction plane centered on origin point. Instead, it is close to a corner,
like in the second image (Plane_createUsingDirections.png). It seems to be affecting the way the bounding box is set and it's difficult to understand what's going on.
I am unable to replicate a Plane accurately that comes from another software with it's origin, normal, Xdirection, length and height. Any pointers toward another solution are welcome
Thank you,
Charles
Solved! Go to Solution.