anycad / anycad.rapid.net.sample Goto Github PK
View Code? Open in Web Editor NEWThe samples for creating 3D graphics applications with AnyCAD Rapid .NET SDK
Home Page: http://www.anycad.net
License: MIT License
The samples for creating 3D graphics applications with AnyCAD Rapid .NET SDK
Home Page: http://www.anycad.net
License: MIT License
无法加载和显示stl文件
ASCII格式的和二进制格式的都不行
文件如下:
百度云盘
链接:https://pan.baidu.com/s/1jlqPt40ez5GOtkIjwcSzrg
提取码:02ko
链接:https://pan.baidu.com/s/15PClQ_79Xe6aIe47PM_Zrg
提取码:ji6i
以前的版本中可以设置模型的显示模式,如
renderView.SetDisplayMode((int)(EnumDisplayStyle.DS_Face|EnumDisplayStyle.DS_Realistic));
新版本中没有
通过 var geometry = GeometryBuilder.CreatePoints(new Float32Array(mPositions), new Float32Array(mColors));
var node = new PrimitiveSceneNode(geometry, material);
node.SetPickable(false);
mRenderView.ShowSceneNode(node);
可以添加单个点,也可以添加点云,但是无法在Render中拾取点。
希望拾取点可以通过点击鼠标左键单独拾取,也可以通过画矩形框进行多选。
Hello. I have a TopoShape, I display it on scene, and try to transform obtained SceneNode:
Matrix4 transfrm = Matrix4.makeRotationAxis(new Vector3(0, 1, 1), (float) Math.PI/2);
SceneNode tool0 = mRenderView.ShowShape(myTopoShape, Vector3.Blue);
tool0.SetTransform(transfrm);
tool0.RequstUpdate();
But my scene element is not affected. What am I missing?
In older edition of anycad SDK I could use:
renderView.ShowWorkingGrid(bool)
from AnyCAD.Presentation.RenderWindow3d
.
But in anycad.rapid.net we use now AnyCAD.Forms.RenderControl which does not have such method.
坐标系某个轴用鼠标选中后,用setvisiable(false)对坐标系node进行隐藏,选中的部分隐藏不了。
This question relates latest release of anycad in general. I ask it here.
I have followed code in examples and added a box to scene:
var box = ShapeBuilder.MakeBox(GP.XOY(), 10, 20, 30);
mRenderView.ShowShape(box, Vector3.LightGray);
and got such result with clipped planes:
Example shows fine. Are there any additional settings to fight off those clippings?
就像以前anycad的MakeSurfaceFromPoints
Hello.
I think, it may be useful for anycad.rapid.net to have a documentation available for offline use.
I mean, all materials in an archive from http://anycad.cn/api
I am including picture here. I am hovering mouse over blue box, which is located behind green one.
As you can see, highlight is shown in front of green one, overlapping it. I think this may be related to how shader is written. And I think that highlight should not overwrite color of overlapped figures.
Hello. I want to be able to rotate with the right click mouse event, and not the left. Also, I'd like to know, is it possible in general to configure input behavior in Viewer pane? We would make User to be able to choose how they would pan, zoom and rotate the scene.
原有anycad中有一个FitAll()方法,同时该方法让模型大小和3D显示区域显示一个合适的比例,而且可以在这个FitAll设置显示比例
现在ZoomAll()直接将模型显示到3D显示区域最大一个范围
能否实现原有anycad中有一个FitAll()方法达到的效果
What is the API for controlling a grid look? I mean, number of cells, style of lines ? Related to #9
How do I register SDK?
三点截取一个平面,生成一个草图,草图上显示在这个平面上的点,草图编辑完在三维界面中显示并返回编辑后的点?
Currently FeatureTool class has a call to Extrude a TopoShape
public static TopoShape Extrude(TopoShape base_, double height, GDir _dir);
SUGGESTION:
add a similar call
public static TopoShape Extrude(TopoShapeList base_, double height, GDir _dir);
I have placed a scenenode with opacity using such code:
materialBox = ShapeBuilder.MakeBox(GP.XOY(), Math.Abs( x ), Math.Abs( y ), Math.Abs( z ));
MeshPhongMaterial GrayMaterial222 = MeshPhongMaterial.Create("phong.color");
GrayMaterial222.SetColor(Vector3.LightGray);
GrayMaterial222.SetTransparent(true);
GrayMaterial222.SetOpacity(0.5f);
materialNode = BrepSceneNode.Create(materialBox, GrayMaterial222, null);
mRenderView.ShowSceneNode(materialNode);
I have placed some lines above and below it too. It is expected that you can see all those lines, but you cannot.
View of One side:
View of another side:
0x00007FFD0FD20F95 (opengl32.dll) (LaserRanderMeas.exe 中)处有未经处理的异常: 0xC0000005: 读取位置 0x0000000000000A38 时发生访问冲突。
之前使用的0903的版本,更新0921版本后出现该问题。
能够读取到Step214文件的图层信息,并且可以对图层做操作。
AnyCAD.Rapid中的FontMaterial所实现的效果跟原有Anycad中TextNode实现的效果不一样
由于需要在3D图像上做文字标注,原有在Anycad上使用的是TextNode,基本可以达到效果,但是
现有AnyCAD.Rapid中FontMaterial实现文字无法达到原来效果
原有anycad中
String fontName = "simhei.ttf";
AnyCAD.Platform.Font font = GlobalInstance.FontManager.FindFont(fontName);
if (font != null)
{
font.SetCharHeight(24);
font.SetCharWdith(24);
font.Update();
}
可以指定显示的字体
而AnyCAD.Rapid版本中,缺乏这个功能
var fontMaterial = FontMaterial.Create("font-texture-1");
fontMaterial.SetFaceSide(EnumFaceSide.DoubleSide);
fontMaterial.SetColor(new Vector3(1, 1, 0));
fontMaterial.SetBackground(new Vector3(0, 0, 1));
fontMaterial.SetBillboard(true);
var dim = fontMaterial.SetText("Hello 世界!", 32);
var shape = GeometryBuilder.CreatePlane(dim.x * 0.1f, dim.y * 0.1f);
var node = new PrimitiveSceneNode(shape, fontMaterial);
node.SetPickable(false);
render.ShowSceneNode(node);
I can display an object on Render Window using a ShowShape call.
var box = ShapeBuilder.MakeBox(GP.XOY(), 10, 20, 30);
render.ShowShape(box, Vector3.Green);
How do I remove something from display?
Hello. I have cloned this project, now I am trying to build it and run.
It builds fine, but I get such exception on startup:
System.TypeInitializationException
HResult=0x80131534
Message=The type initializer for 'AnyCAD.Foundation.AnyCADPINVOKE' threw an exception.
Source=AnyCAD.Foundation.Net
StackTrace:
at AnyCAD.Foundation.AnyCADPINVOKE.ModelingEngine_Initialize()
at AnyCAD.Foundation.GlobalInstance.Initialize()
at AnyCAD.Demo.Program.Main() in
\AnyCAD.WinForms\Program.cs:line 18
Inner Exception 1:
TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception.
Inner Exception 2:
DllNotFoundException: Unable to load DLL 'AnyCAD.Foundation.NetHost.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.