Replies: 1 comment
-
|
Yeah, TransformBy will throw. The work around is to add it to a block, scale the reference, then explode it. Or you can transform the vertices pnts = Ge.Point3dArray()
pnts.extend([Ge.Point3d(0, 0, 0), Ge.Point3d(10, 0, 0), Ge.Point3d(10, 10, 0)])
SX = 5.0
SY = -3.0
SZ = 1.0
matrix = Ge.Matrix3d()
matrix.setCoordSystem(
Ge.Point3d.kOrigin,
Ge.Vector3d.kXAxis * SX,
Ge.Vector3d.kYAxis * SY,
Ge.Vector3d.kZAxis * SZ,
)
pline = Db.Polyline(pnts)
Db.curDb().addToModelspace(pline)
clonepnts = Ge.Point3dArray()
clonepnts.extend(pline.toPoint3dList())
clonepnts.transformBy(matrix)
clone = Db.Polyline(clonepnts)
Db.curDb().addToModelspace(clone) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm having trouble transforming a block. My main goal is to transform a polyline. I know I can't scale it nonuniformly directly. However, I once used a workaround by adding the polyline to the block first, then scaling it, and then exploding the block. This approach works if I simply scale the block. However, if I try to use
.transformBy(), I geteCannotScaleNonUniformly.Beta Was this translation helpful? Give feedback.
All reactions