
Fri, 10/28/2011 - 14:01
Forums:
Hi,
I saw the import/Export sample of opencascade, Now i have a small requirement, Besides showing the 3D drawing, I want to show the dimensions as measurements illustrated along with the 3D Model. How can I do this? Please help.
I have attached a snap showing the functionality I want, Please refer it.
Thanks
-anand
Attachments:
Fri, 10/28/2011 - 19:51
Use AIS_XXXDimension classes. XXX can be Length, Radius or whatever! Check out the documentation.
Tue, 11/01/2011 - 08:12
Thank You Sharjith
Tue, 11/01/2011 - 12:33
I tried with AIS_LengthDimension, but its not giving desired results. Can you give a sample code for doing this?
-
regards
anand
Tue, 11/01/2011 - 14:30
Dear Anand,
Some example you may find in ViewerTest_RelationCommands.cxx file.
See function VLenghtDimension.
Hope it will help you.
Regards
Tue, 11/01/2011 - 15:06
Thank U, thank U very much!!!
Tue, 11/01/2011 - 15:06
Thank U, thank U very much!!!
Tue, 11/01/2011 - 16:30
Hi,
I tried the way as it is written in ViewerTest_RelationCommands, but nothing comes in the screen. Here I found a difference, my edges are qualifying the IsParallel condition, I dont know.
Please check the attachment, to see my requirement. I think there is something wrong with the plane I am calculating, Can u explain the logic behind this line...
Handle(AIS_LengthDimension ) myLenghtDim=new AIS_LengthDimension (EdgeA,EdgeB,theGeomPlane,theDist,TheMessage_Str );
Wed, 11/02/2011 - 08:51
Sorry I slight mistype occured, my consecutive edges were NOT qualifying IsParallel condition, eventhough it seemed to be parallel.
Thu, 11/03/2011 - 10:37
Hi,
After exhaustive tests I my self came to a conclusion that for showing dimension properly of a cylinder, an END EDGE and LATERAL EDGE is needed.
Is this conclusion right?
Please comment.
-
Thanks
Anand
Thu, 11/03/2011 - 11:27
Dear Anand,
I would suggested you to overlook AIS_LengthDimension class.
It has 5 constructor. Purpose of each are well documented. See corresponding documentation.
Regards
Thu, 11/03/2011 - 15:48
Hi,
I made a walk-through, now I got enough idea about the API function. Thank You for the quick replies.
regards
- Anand
Mon, 11/07/2011 - 09:44
sir, i want to know how to get cylinder's coordinate in opencascade class
thanx
Mon, 11/07/2011 - 15:35
Use TopExp_Explorer to extract the radial edges use GCPnts_UniformAbscissa...see following code
BRepAdaptor_Curve curve_adaptator (edge);
GCPnts_UniformAbscissa discretizer;
discretizer.Initialize (curve_adaptator, numPoints);
if (discretizer.IsDone ())
{
for ( int i =1 ; i <= discretizer.NbPoints() ; i++ )
{
gp_Pnt p = curve_adaptator.Value (discretizer.Parameter (i));
points.push_back( p );
}
}