Browsing all articles in Help

The dxfViewer based on AnyCAD Graphics Component Pro

Posted Posted by anycad in Help, News, Showcase     Comments No comments
Apr
5

dxfViewer is an open source sample to show the dxf importer functionality of AnyCAD .Net Graphics Component Pro.

Features:

  • Import DXF file
  • Export to Image
  • Print as PDF

Get the source code

 

Note: dxfViewer is based on AnyCAD .Net Graphics Component 2014 Update 1

 

Showcase:

20140405181722 20140405181806

 

 

AnyCAD Editor Sample 3

Posted Posted by anycad in Help     Comments No comments
Jan
5

Let’s create a simple Table in this sample.

Paste the following code to the Edit area:

aBrepTool=BrepTools();
aDir = Vector3(0, 0, 1)
aRadius = 5
aHeight = 120
aShape1=aBrepTool:MakeCylinder(Vector3(-100, -100, 0), aDir, aRadius, aHeight, 0)
aShape2=aBrepTool:MakeCylinder(Vector3(100, -100, 0), aDir, aRadius, aHeight, 0)
aShape3=aBrepTool:MakeCylinder(Vector3(-100, 100, 0), aDir, aRadius, aHeight, 0)
aShape4=aBrepTool:MakeCylinder(Vector3(100, 100, 0), aDir, aRadius, aHeight, 0)
aShape5 = aBrepTool:BooleanAdd(aShape1, aShape2)
aShape6 = aBrepTool:BooleanAdd(aShape5, aShape3)
aShape7 = aBrepTool:BooleanAdd(aShape6, aShape4)
aBox = aBrepTool:MakeCylinder(Vector3(0, 0, aHeight), aDir, 160, 10, 0)
theShape = aBrepTool:BooleanAdd(aShape7, aBox)

AnyCAD Editor Sample 2

Posted Posted by AnyCAD in Help     Comments No comments
Dec
27
We won’t use parameter in this sample, so it becomes simple:
– Create a polygon
– Create the extrude shape
– Add fillet
arrPts = Vector3List()
arrPts:Add(Vector3(-200, 200, 0))
arrPts:Add(Vector3(200, 200, 0))
arrPts:Add(Vector3(200, 100, 0))
arrPts:Add(Vector3(100, 100, 0))
arrPts:Add(Vector3(100, -100, 0))
arrPts:Add(Vector3(200, -100, 0))
arrPts:Add(Vector3(200, -200, 0))
arrPts:Add(Vector3(-200, -200, 0))
arrPts:Add(Vector3(-200, -100, 0))
arrPts:Add(Vector3(-100, -100, 0))
arrPts:Add(Vector3(-100, 100, 0))
arrPts:Add(Vector3(-200, 100, 0))
aBrepTool=BrepTools()
aPolygon=aBrepTool:MakePolygon(arrPts)
aFace = aBrepTool:MakeFace(aPolygon)
aExtrude = aBrepTool:Extrude(aFace, 500, Vector3(0,0,1))
theShape = aBrepTool:Fillet(aExtrude, 15)

Results:

PS:

Please use AnyCAD Editor 2011 to test this sample.

AnyCAD Editor Sample 1

Posted Posted by anycad in Help, News     Comments No comments
Dec
9

This sample demonstrates how to build a cylinder geometry and apply the fillet feature on it.

1. Add Parameters

Open the Parameter Manager dialog, add three double parameters: Height, Radius, Angle.

2. Write the script:



aBrepTool=BrepTools();
aHeightParam = theParameterSet:FindParameter(“Height”)
aAngleParam = theParameterSet:FindParameter(“Angle”)
aRadiusParam = theParameterSet:FindParameter(“Radius”)
aShape=aBrepTool:MakeCylinder(Vector3(0,0,0), Vector3(0,0,1), aRadiusParam:AsDouble(), aHeightParam:AsDouble(), aAngleParam:AsDouble())
theShape = aBrepTool:Fillet(aShape, 5)

3. Run

anycad.editor.sample

PS:

This sample is based on AnyCAD Editor 2011

Categories

Archives

ACIS OpenCASCADE SketchUp Ogre3d VTK AutoCAD SKP IGES STEP SAT DWG DWF DXF STL OBJ DAE FBX RVT free viewer editor freeware 3d model