Message 1 of 2
How create on the modelspace NurbSurface?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have a problem with creating nurbsurface on the model space .
I try create not a rational surfaces.
Autodesk.AutoCAD.DatabaseServices.NurbSurface nurb = new Autodesk.AutoCAD.DatabaseServices.NurbSurface(UDegree, VDegree, NurbRational, ControlPoints.Count, ControlPoints[0].Count, Points, NurbWeights, NurbKnots(UKnots), NurbKnots(VKnots)); return nurb;
Then i try set it on the model space. (I have a method which return object of entity GetMyEntity(object entity) )
Autodesk.AutoCAD.DatabaseServices.Entity ent = GetMyEntity(key) as Autodesk.AutoCAD.DatabaseServices.Entity; if (ent != null) { using (Transaction transaction = tm.StartTransaction()) { BlockTable bt = (BlockTable)tm.GetObject(db.BlockTableId, OpenMode.ForRead, false); BlockTableRecord btr = (BlockTableRecord)tm.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite, false); btr.AppendEntity(ent); tm.AddNewlyCreatedDBObject(ent, true); transaction.Commit(); } }
This code works when i try set to modelspace simple nurbsurface. But if i try set to modelspace surface with 40 - 70 controls points , this surface is not created ... or maybi it invisible .... Can somebody help me with this?